-
Notifications
You must be signed in to change notification settings - Fork 7
/
MhoraControl.cs
571 lines (521 loc) · 24.8 KB
/
MhoraControl.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
/******
Copyright (C) 2005 Ajit Krishnan (http://www.mudgala.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
******/
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace mhora
{
/// <summary>
/// Summary description for MhoraControl.
/// </summary>
public class MhoraControl : System.Windows.Forms.UserControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
protected Horoscope h;
protected Splitter sp;
public Horoscope ControlHoroscope
{
get { return h; }
set { h = value; }
}
/*public MhoraControl(Horoscope _h)
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
_h = h;
// TODO: Add any initialization after the InitForm call
}*/
public MhoraControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
// TODO: Add any initialization after the InitForm call
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// MhoraControl
//
this.AutoScroll = true;
this.Name = "MhoraControl";
this.Size = new System.Drawing.Size(360, 216);
this.Load += new System.EventHandler(this.MhoraControl_Load);
}
#endregion
public void ViewControl (MhoraControlContainer.BaseUserOptions.ViewType vt)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(vt);
}
protected void ViewVimsottariDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaVimsottari);
}
protected void ViewYogaVimsottariDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaYogaVimsottari);
}
protected void ViewKaranaChaturashitiSamaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaKaranaChaturashitiSama);
}
protected void ViewAshtottariDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaAshtottari);
}
protected void ViewTithiPraveshAshtottariDasaTithi (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaTithiPraveshAshtottariCompressedTithi);
}
protected void ViewTithiPraveshAshtottariDasaSolar (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaTithiPraveshAshtottariCompressedSolar);
}
protected void ViewTithiPraveshAshtottariDasaFixed (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaTithiPraveshAshtottariCompressedFixed);
}
protected void ViewTithiAshtottariDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaTithiAshtottari);
}
protected void ViewYogaPraveshVimsottariDasaYoga (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaYogaPraveshVimsottariCompressedYoga);
}
protected void ViewShodashottariDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaShodashottari);
}
protected void ViewDwadashottariDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaDwadashottari);
}
protected void ViewPanchottariDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaPanchottari);
}
protected void ViewShatabdikaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaShatabdika);
}
protected void ViewChaturashitiSamaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaChaturashitiSama);
}
protected void ViewDwisaptatiSamaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaDwisaptatiSama);
}
protected void ViewShatTrimshaSamaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaShatTrimshaSama);
}
protected void ViewYoginiDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaYogini);
}
protected void ViewKalachakraDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaKalachakra);
}
protected void ViewNaisargikaGrahaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.NaisargikaGrahaDasa);
}
protected void ViewKarakaKendradiGrahaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaKarakaKendradiGraha);
}
protected void ViewMoolaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaMoola);
}
protected void ViewNaisargikaRasiDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.NaisargikaRasiDasa);
}
protected void ViewNarayanaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaNarayana);
}
protected void ViewNarayanaSamaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaNarayanaSama);
}
protected void ViewShoolaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaShoola);
}
protected void ViewNiryaanaShoolaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaNiryaanaShoola);
}
protected void ViewSuDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaSu);
}
protected void ViewNavamsaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaNavamsa);
}
protected void ViewMandookaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaMandooka);
}
protected void ViewCharaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaChara);
}
protected void ViewTrikonaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaTrikona);
}
protected void ViewDrigDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaDrig);
}
protected void ViewSudarshanaChakraDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaSudarshanaChakra);
}
protected void ViewLagnaKendradiRasiDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaLagnaKendradiRasi);
}
protected void ViewSudarshanaChakraDasaCompressed (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaSudarshanaChakraCompressed);
}
protected void ViewMuddaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaMudda);
}
protected void ViewTajakaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaTajaka);
}
protected void ViewTattwaDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaTattwa);
}
protected void ControlCopyToClipboard (object sender, System.EventArgs e)
{
((MhoraControl)this).copyToClipboard();
}
protected virtual void copyToClipboard ()
{
}
protected void ViewTithiPraveshDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaTithiPravesh);
}
protected void ViewYogaPraveshDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaYogaPravesh);
}
protected void ViewNakshatraPraveshDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaNakshatraPravesh);
}
protected void ViewKaranaPraveshDasa (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaKaranaPravesh);
}
protected void ViewKeyInfo (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.KeyInfo);
}
protected void ViewBasicCalculations (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.BasicCalculations);
}
protected void ViewDivisionalChart (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DivisionalChart);
}
protected void ViewBalas (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.Balas);
}
protected void ViewAshtakavarga (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.Ashtakavarga);
}
protected void ViewKutaMatching (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.KutaMatching);
}
protected void ViewNavamsaCircle (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.NavamsaCircle);
}
protected void ViewVaraChakra (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.VaraChakra);
}
protected void ViewSarvatobhadraChakra (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.ChakraSarvatobhadra81);
}
protected void ViewTransitsSearch (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.TransitSearch);
}
protected void ViewPanchanga (object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.Panchanga);
}
protected void SplitViewHorizontal (object sender, System.EventArgs e)
{
MhoraControlContainer c_this = (MhoraControlContainer)this.Parent;
MhoraSplitContainer c_grand = (MhoraSplitContainer)c_this.Parent;
DivisionalChart dc1 = new DivisionalChart (h);
MhoraControlContainer c_dc1 = new MhoraControlContainer (dc1);
DivisionalChart dc2 = new DivisionalChart (h);
MhoraControlContainer c_cd2 = new MhoraControlContainer (dc2);
MhoraSplitContainer ns = new MhoraSplitContainer (c_dc1);
ns.Control1 = c_cd2;
ns.DrawDock = MhoraSplitContainer.DrawStyle.UpDown;
c_grand.Control2 = ns;
return;
//c_grand.Control2 = c_dc;
//c_dc.Dock = DockStyle.Fill;
//return;
/*
MhoraSplitContainer new_split = new MhoraSplitContainer (c_this);
new_split.Control2 = c_this;
new_split.DrawDock = MhoraSplitContainer.DrawStyle.UpDown;
new_split.Dock = DockStyle.Fill;
c_grand.Control2 = new_split;
c_grand.Show();
*/
}
protected void AddViewsToContextMenu (ContextMenu cmenu)
{
MenuItem mBasicsMenu = new MenuItem ("Basic Info");
mBasicsMenu.MenuItems.Add ("Key Info", new EventHandler(ViewKeyInfo));
mBasicsMenu.MenuItems.Add ("Calculations", new EventHandler(ViewBasicCalculations));
mBasicsMenu.MenuItems.Add ("Divisional Chart", new EventHandler(ViewDivisionalChart));
mBasicsMenu.MenuItems.Add ("Balas", new EventHandler(ViewBalas));
mBasicsMenu.MenuItems.Add ("Ashtakavarga", new EventHandler(ViewAshtakavarga));
MenuItem mChakrasMenu = new MenuItem ("Chakras");
mChakrasMenu.MenuItems.Add ("Navamsa Chakra", new EventHandler(ViewNavamsaCircle));
mChakrasMenu.MenuItems.Add ("Vara Chakra", new EventHandler(ViewVaraChakra));
mChakrasMenu.MenuItems.Add ("Sarvatobhadra Chakra", new EventHandler(ViewSarvatobhadraChakra));
MenuItem mNakDasaMenu = new MenuItem("Nakshatra Dasa");
mNakDasaMenu.MenuItems.Add ("Vimsottari Dasa", new EventHandler(ViewVimsottariDasa));
mNakDasaMenu.MenuItems.Add ("Ashottari Dasa", new EventHandler(ViewAshtottariDasa));
mNakDasaMenu.MenuItems.Add ("-");
mNakDasaMenu.MenuItems.Add ("Panchottari Dasa", new EventHandler(ViewPanchottariDasa));
mNakDasaMenu.MenuItems.Add ("Dwadashottari Dasa", new EventHandler(ViewDwadashottariDasa));
mNakDasaMenu.MenuItems.Add ("Shodashottari Dasa", new EventHandler(ViewShodashottariDasa));
mNakDasaMenu.MenuItems.Add ("Chaturashiti Sama Dasa", new EventHandler(ViewChaturashitiSamaDasa));
mNakDasaMenu.MenuItems.Add ("Dwisaptati Sama Dasa", new EventHandler(ViewDwisaptatiSamaDasa));
mNakDasaMenu.MenuItems.Add ("ShatTrimsha Sama Dasa", new EventHandler(ViewShatTrimshaSamaDasa));
mNakDasaMenu.MenuItems.Add ("Shatabdika Dasa", new EventHandler(ViewShatabdikaDasa));
mNakDasaMenu.MenuItems.Add ("Kalachakra Dasa", new EventHandler(ViewKalachakraDasa));
mNakDasaMenu.MenuItems.Add ("Yogini Dasa", new EventHandler(ViewYoginiDasa));
mNakDasaMenu.MenuItems.Add ("-");
mNakDasaMenu.MenuItems.Add ("Tithi Ashtottari Dasa", new EventHandler(ViewTithiAshtottariDasa));
mNakDasaMenu.MenuItems.Add ("Yoga Vimsottari Dasa", new EventHandler(ViewYogaVimsottariDasa));
mNakDasaMenu.MenuItems.Add ("Karana Chaturashiti Sama Dasa", new EventHandler(ViewKaranaChaturashitiSamaDasa));
MenuItem mGrahaDasaMenu = new MenuItem ("Graha Dasa");
mGrahaDasaMenu.MenuItems.Add ("Naisargika Dasa", new EventHandler(ViewNaisargikaGrahaDasa));
mGrahaDasaMenu.MenuItems.Add ("Moola Dasa", new EventHandler(ViewMoolaDasa));
mGrahaDasaMenu.MenuItems.Add ("Karaka Kendradi Dasa", new EventHandler(ViewKarakaKendradiGrahaDasa));
MenuItem mRasiDasaMenu = new MenuItem ("Rasi Dasa");
mRasiDasaMenu.MenuItems.Add ("Naisargika Dasa", new EventHandler(ViewNaisargikaRasiDasa));
mRasiDasaMenu.MenuItems.Add ("Narayana Dasa", new EventHandler (ViewNarayanaDasa));
mRasiDasaMenu.MenuItems.Add ("Narayana Sama Dasa", new EventHandler (ViewNarayanaSamaDasa));
mRasiDasaMenu.MenuItems.Add ("Shoola Dasa", new EventHandler (ViewShoolaDasa));
mRasiDasaMenu.MenuItems.Add ("Niryaana Shoola Dasa", new EventHandler(ViewNiryaanaShoolaDasa));
mRasiDasaMenu.MenuItems.Add ("Drig Dasa", new EventHandler (ViewDrigDasa));
mRasiDasaMenu.MenuItems.Add ("Su Dasa", new EventHandler (ViewSuDasa));
mRasiDasaMenu.MenuItems.Add ("Sudarshana Chakra Dasa", new EventHandler(ViewSudarshanaChakraDasa));
mRasiDasaMenu.MenuItems.Add ("Lagna Kendradi Rasi Dasa", new EventHandler(ViewLagnaKendradiRasiDasa));
mRasiDasaMenu.MenuItems.Add ("Navamsa Ayur Dasa", new EventHandler(ViewNavamsaDasa));
mRasiDasaMenu.MenuItems.Add ("Mandooka Dasa", new EventHandler(ViewMandookaDasa));
mRasiDasaMenu.MenuItems.Add ("Chara Dasa", new EventHandler(ViewCharaDasa));
mRasiDasaMenu.MenuItems.Add ("Trikona Dasa", new EventHandler(ViewTrikonaDasa));
MenuItem mRelatedChartMenu = new MenuItem ("Yearly Charts");
mRelatedChartMenu.MenuItems.Add ("Tajaka Chart", new EventHandler (ViewTajakaDasa));
mRelatedChartMenu.MenuItems.Add ("Sudarshana Chakra Dasa (Solar Year)", new EventHandler(ViewSudarshanaChakraDasaCompressed));
mRelatedChartMenu.MenuItems.Add ("Mudda Dasa (Solar Year)", new EventHandler(ViewMuddaDasa));
mRelatedChartMenu.MenuItems.Add ("-");
mRelatedChartMenu.MenuItems.Add ("Tithi Pravesh Chart", new EventHandler (ViewTithiPraveshDasa));
mRelatedChartMenu.MenuItems.Add ("Tithi Pravesh Ashtottari Dasa (Tithi Year)", new EventHandler(ViewTithiPraveshAshtottariDasaTithi));
mRelatedChartMenu.MenuItems.Add ("Tithi Pravesh Ashtottari Dasa (Solar Year)", new EventHandler(ViewTithiPraveshAshtottariDasaSolar));
mRelatedChartMenu.MenuItems.Add ("Tithi Pravesh Ashtottari Dasa (Fixed Year)", new EventHandler(ViewTithiPraveshAshtottariDasaFixed));
mRelatedChartMenu.MenuItems.Add ("-");
mRelatedChartMenu.MenuItems.Add ("Yoga Pravesh Chart", new EventHandler (ViewYogaPraveshDasa));
mRelatedChartMenu.MenuItems.Add ("Yoga Pravesh Vimsottari Dasa (Yoga Year)", new EventHandler(ViewYogaPraveshVimsottariDasaYoga));
mRelatedChartMenu.MenuItems.Add ("-");
mRelatedChartMenu.MenuItems.Add ("Nakshatra Pravesh Chart", new EventHandler(ViewNakshatraPraveshDasa));
mRelatedChartMenu.MenuItems.Add ("-");
mRelatedChartMenu.MenuItems.Add ("Karana Pravesh Chart", new EventHandler(ViewKaranaPraveshDasa));
mRelatedChartMenu.MenuItems.Add ("-");
mRelatedChartMenu.MenuItems.Add ("Tattwa Dasa", new EventHandler (ViewTattwaDasa));
MenuItem mOtherMenu = new MenuItem ("Other");
mOtherMenu.MenuItems.Add ("Kuta Matching", new EventHandler(ViewKutaMatching));
mOtherMenu.MenuItems.Add ("Transit Search", new EventHandler (ViewTransitsSearch));
mOtherMenu.MenuItems.Add ("Panchanga", new EventHandler(ViewPanchanga));
//MenuItem mSplitMenu = new MenuItem ("Split View");
//mSplitMenu.MenuItems.Add ("Split Horizontal", new EventHandler(SplitViewHorizontal));
cmenu.MenuItems.Add (mBasicsMenu);
cmenu.MenuItems.Add (mChakrasMenu);
cmenu.MenuItems.Add (mNakDasaMenu);
cmenu.MenuItems.Add (mGrahaDasaMenu);
cmenu.MenuItems.Add (mRasiDasaMenu);
cmenu.MenuItems.Add (mOtherMenu);
cmenu.MenuItems.Add (mRelatedChartMenu);
cmenu.MenuItems.Add ("Copy To clipboard", new EventHandler (ControlCopyToClipboard));
//cmenu.MenuItems.Add (mSplitMenu);
}
protected void MhoraControl_Load(object sender, System.EventArgs e)
{
}
protected virtual void FontRows (ListView mList)
{
mList.ForeColor = MhoraGlobalOptions.Instance.TableForegroundColor;
Font f = MhoraGlobalOptions.Instance.GeneralFont;
//new Font ("Courier New", 10);
mList.Font = f;
foreach (ListViewItem li in mList.Items)
{
li.Font = f;
}
}
protected virtual void ColorAndFontRows (ListView mList)
{
ColorRows (mList);
FontRows (mList);
}
protected virtual void ColorRows (ListView mList)
{
Color[] cList = new Color[2];
cList[1] = MhoraGlobalOptions.Instance.TableOddRowColor;
cList[0] = MhoraGlobalOptions.Instance.TableEvenRowColor;
//cList[1] = Color.WhiteSmoke;
for (int i=0; i<mList.Items.Count; i++)
{
if (i%2==1) mList.Items[i].BackColor = cList[0];
else mList.Items[i].BackColor = cList[1];
}
mList.BackColor = MhoraGlobalOptions.Instance.TableBackgroundColor;
}
private void DoNothing (Object o)
{
}
/*protected void mChangeView_Click(object sender, System.EventArgs e)
{
MhoraControlContainer cont = (MhoraControlContainer)this.Parent;
MhoraControlContainer.BaseUserOptions options = cont.options;
cont.h = this.h;
Form f = new MhoraOptions(options.Clone(), new ApplyOptions(cont.SetBaseOptions));
f.Show();
}*/
private void mViewDasaVimsottari_Click(object sender, System.EventArgs e)
{
}
private void mDasa_Click(object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).h = this.h;
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DasaVimsottari);
}
private void mDivisionalChart_Click(object sender, System.EventArgs e)
{
((MhoraControlContainer)this.Parent).SetView(MhoraControlContainer.BaseUserOptions.ViewType.DivisionalChart);
}
}
}