コード例 #1
0
ファイル: TodayForm.cs プロジェクト: vijeetgv/GCAL
        private void TodayForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            shared_today_form = null;
            GPUserDefaults.SetIntForKey("todayform.bounds.left", Location.X);
            GPUserDefaults.SetIntForKey("todayform.bounds.top", Location.Y);
            GPUserDefaults.SetIntForKey("todayform.bounds.width", Size.Width);
            GPUserDefaults.SetIntForKey("todayform.bounds.height", Size.Height);
            GPUserDefaults.SetBoolForKey("todayform.bounds.initd", true);

            SupervisorForm.WindowClosed(this);
        }
コード例 #2
0
ファイル: SupervisorForm.cs プロジェクト: vijeetgv/GCAL
        public SupervisorForm()
        {
            InitializeComponent();

            sharedSupervisor = this;

            MainForm form = new MainForm();

            form.Show();

            if (GPDisplays.Today.VisibleAtLaunch())
            {
                TodayForm.ShowForm();
            }

            StartForm form2 = new StartForm();

            form2.Show();
        }
コード例 #3
0
ファイル: TodayForm.cs プロジェクト: vijeetgv/GCAL
 /// <summary>
 /// static function for displaying Today screen
 /// </summary>
 public static void ShowForm(GPGregorianTime initDate)
 {
     if (shared_today_form == null)
     {
         shared_today_form = new TodayForm(initDate);
         if (GPUserDefaults.BoolForKey("todayform.bounds.initd", false))
         {
             shared_today_form.StartPosition = FormStartPosition.Manual;
             shared_today_form.Location      = new Point(GPUserDefaults.IntForKey("todayform.bounds.left", 10), GPUserDefaults.IntForKey("todayform.bounds.top", 10));
             shared_today_form.Size          = new Size(GPUserDefaults.IntForKey("todayform.bounds.width", 200), GPUserDefaults.IntForKey("todayform.bounds.height", 400));
         }
         shared_today_form.Show();
     }
     else
     {
         if (initDate != null)
         {
             shared_today_form.SetDate(initDate);
         }
         shared_today_form.BringToFront();
         shared_today_form.Activate();
     }
 }