コード例 #1
0
        public MainWindow()
        {
            try
            {
                InitializeComponent();

                BucketReportBE.Initialize();

                BMessage.sbInitialize((Brush)FindResource("BaseColor"),
                                      (Brush)FindResource("BackColor"),
                                      (Brush)FindResource("FontColor"),
                                      (Brush)FindResource("FontColor"),
                                      (FontFamily)FindResource("Font"),
                                      BucketReportBE.Instance.WorkDirectory + BucketReportBE.LogsFolder);

                if (BucketReportBE.Instance.Configuration.IssuesRepository.Equals("") ||
                    BucketReportBE.Instance.Configuration.BaseApiUri.Equals("") ||
                    BucketReportBE.Instance.Configuration.UserKey.Equals("") ||
                    BucketReportBE.Instance.Configuration.UserSecret.Equals(""))
                {
                    if (!openConfig())
                    {
                        Close();
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #2
0
        public SpinerBaseMain()
        {
            string strWorkDirectory;

            try
            {
                InitializeComponent();

                strWorkDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\SpinerBase\\";

                if (Directory.Exists(strWorkDirectory) == false)
                {
                    Directory.CreateDirectory(strWorkDirectory);
                }

                BMessage.sbInitialize((Brush)FindResource("BaseColor"),
                                      (Brush)FindResource("BackColor"),
                                      (Brush)FindResource("FontColor"),
                                      (Brush)FindResource("FontColor"),
                                      (FontFamily)FindResource("Font"),
                                      strWorkDirectory + "\\Log");

                SpinerBaseBO.InitiateInstance(strWorkDirectory + "\\SpinerBaseData.json");
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #3
0
        public CaquiTimerMain()
        {
            try
            {
                InitializeComponent();

                var desktopWorkingArea = System.Windows.SystemParameters.WorkArea;
                this.Left = desktopWorkingArea.Right - this.Width;
                this.Top  = desktopWorkingArea.Bottom - this.Height;

                BMessage.sbInitialize((Brush)FindResource("BaseColor"),
                                      (Brush)FindResource("BackColor"),
                                      (Brush)FindResource("FontColorDark"),
                                      (Brush)FindResource("FontColor"),
                                      (FontFamily)FindResource("Font"),
                                      CaquiTimerBO.Instance.WorkDirectory + "\\Log");

                objContextMenu = new System.Windows.Forms.ContextMenu();

                objContextMenu.MenuItems.Add(GlobalizationSource.Open);
                objContextMenu.MenuItems[0].Click += mnuOpen_Click;

                objContextMenu.MenuItems.Add(GlobalizationSource.Pause);
                objContextMenu.MenuItems[1].Click += mnuPause_Click;

                objContextMenu.MenuItems.Add(GlobalizationSource.NextTask);
                objContextMenu.MenuItems[2].Click += mnuNextTask_Click;

                objContextMenu.MenuItems.Add(GlobalizationSource.Close);
                objContextMenu.MenuItems[3].Click += mnuClose_Click;

                objTrayIcon              = new System.Windows.Forms.NotifyIcon();
                objTrayIcon.Icon         = Properties.Resources.icon1;
                objTrayIcon.ContextMenu  = objContextMenu;
                objTrayIcon.Visible      = false;
                objTrayIcon.Text         = GlobalizationSource.AppName;
                objTrayIcon.DoubleClick += mnuOpen_Click;

                UpdateTextValues();
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #4
0
        public MainWindow()
        {
            try
            {
                InitializeComponent();

                blnLoaded = false;

                BMessage.sbInitialize((Brush)FindResource("BaseColor"),
                                      (Brush)FindResource("BackColor"),
                                      (Brush)FindResource("FontColorDark"),
                                      (Brush)FindResource("FontColor"),
                                      (FontFamily)FindResource("Font"),
                                      SirtisIndexerBO.Instance.WorkDirectory + "\\Log");

                objIndexedItens = new List <uscIndexedItem>();
            }
            catch (Exception)
            {
                throw;
            }
        }