Inheritance: System.ComponentModel.Component
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
         System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Splash));
         this.pictureBox1 = new System.Windows.Forms.PictureBox();
         this.timer1 = new System.Windows.Forms.Timer(this.components);
         this.SuspendLayout();
         //
         // pictureBox1
         //
         this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
         this.pictureBox1.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox1.Image")));
         this.pictureBox1.Name = "pictureBox1";
         this.pictureBox1.Size = new System.Drawing.Size(632, 416);
         this.pictureBox1.TabIndex = 0;
         this.pictureBox1.TabStop = false;
         //
         // Splash
         //
         this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
         this.ClientSize = new System.Drawing.Size(632, 416);
         this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                       this.pictureBox1});
         this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         this.Name = "Splash";
         this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
         this.Text = "Splash";
         this.ResumeLayout(false);
 }
示例#2
0
 public ImageManager(string directory, int archImageSize)
 {
     _directory = directory;
     _archDirectory = Path.Combine(_directory, "archive");
     _archImageSize = archImageSize;
     _tick = new Timer { Interval = _updateInterval };
 }
        public MainForm(SpringPaths paths, IResourcePresenceChecker scanner = null, PlasmaDownloader.PlasmaDownloader downloader = null) {
            InitializeComponent();
            springPaths = paths;
            if (scanner != null) springScanner = scanner;
            else {
                var pl = new PlasmaResourceChecker(springPaths);
                springScanner = pl;
                pl.Start();
            }
            if (downloader != null)  springDownloader = downloader;
            else springDownloader = new PlasmaDownloader.PlasmaDownloader(springScanner, springPaths);

            timer = new Timer();
            timer.Tick += (sender, args) =>
                {
                    tbDownloads.Clear();
                    foreach (var d in springDownloader.Downloads.Where(x => x.IsComplete == null))
                        tbDownloads.AppendText(string.Format("{1:F0}% {0}  ETA: {2}  {3}\n",
                                                             d.Name,
                                                             d.TotalProgress,
                                                             d.TimeRemaining,
                                                             d.IsComplete));
                };
            timer.Interval = 1000;
            timer.Enabled = true;

            

            tbEngine.Text = GlobalConst.DefaultEngineOverride;
        }
示例#4
0
 public void InitTimerValidation()
 {
     _timerAuth = new Timer();
     _timerAuth.Tick += new EventHandler(InvokeValidation);
     _timerAuth.Interval = 21600000; //6h
     _timerAuth.Start();
 }
示例#5
0
 public IFProcessor(ISharpControl control)
 {
     this._control = control;
       this._control.PropertyChanged += new PropertyChangedEventHandler(this.NotifyPropertyChangedHandler);
       this._fftTimer = new System.Windows.Forms.Timer();
       this._fftTimer.Tick += new EventHandler(this.fftTimer_Tick);
       this._fftTimer.Interval = 40;
       this._fftBins = 8192;
       this.InitFFTBuffers();
       this.BuildFFTWindow();
       this._spectrumAnalyzer = new SpectrumAnalyzer();
       this._spectrumAnalyzer.Dock = DockStyle.Fill;
       this._spectrumAnalyzer.Margin = new Padding(0, 0, 0, 0);
       this._spectrumAnalyzer.DisplayRange = 130;
       this._spectrumAnalyzer.EnableFilter = false;
       this._spectrumAnalyzer.EnableHotTracking = false;
       this._spectrumAnalyzer.EnableSideFilterResize = true;
       this._spectrumAnalyzer.EnableFilterMove = false;
       this._spectrumAnalyzer.BandType = BandType.Center;
       this._spectrumAnalyzer.StepSize = 1000;
       this._spectrumAnalyzer.UseSmoothing = true;
       this._spectrumAnalyzer.Attack = 0.9f;
       this._spectrumAnalyzer.Decay = 0.6f;
       this._spectrumAnalyzer.StatusText = "IF Spectrum";
       this._spectrumAnalyzer.FrequencyChanged += new ManualFrequencyChangeEventHandler(this.spectrumAnalyzer_FrequencyChanged);
       this._spectrumAnalyzer.CenterFrequencyChanged += new ManualFrequencyChangeEventHandler(this.spectrumAnalyzer_CenterFrequencyChanged);
       this._spectrumAnalyzer.BandwidthChanged += new ManualBandwidthChangeEventHandler(this.spectrumAnalyzer_BandwidthChanged);
       this._spectrumAnalyzer.VisibleChanged += new EventHandler(this.spectrumAnalyzer_VisibleChanged);
       this._control.RegisterStreamHook((object) this, ProcessorType.DecimatedAndFilteredIQ);
       this._control.RegisterFrontControl((UserControl) this._spectrumAnalyzer, (PluginPosition) Utils.GetIntSetting("zoomPosition", 1));
 }
示例#6
0
        /// <summary>
        /// Launch the Lean Engine Primary Form:
        /// </summary>
        /// <param name="engine">Accept the engine instance we just launched</param>
        public LeanEngineWinForm(Engine engine)
        {
            _engine = engine;
            //Setup the State:
            _resultsHandler = engine.AlgorithmHandlers.Results;

            //Create Form:
            Text = "QuantConnect Lean Algorithmic Trading Engine: v" + Constants.Version;
            Size = new Size(1024,768);
            MinimumSize = new Size(1024, 768);
            CenterToScreen();
            WindowState = FormWindowState.Maximized;
            Icon = new Icon("../../../lean.ico");

            //Setup Console Log Area:
            _console = new RichTextBox();
            _console.Parent = this;
            _console.ReadOnly = true;
            _console.Multiline = true;
            _console.Location = new Point(0, 0);
            _console.Dock = DockStyle.Fill;
            _console.KeyUp += ConsoleOnKeyUp;
            
            //Form Events:
            Closed += OnClosed;

            //Setup Polling Events:
            _polling = new Timer();
            _polling.Interval = 1000;
            _polling.Tick += PollingOnTick;
            _polling.Start();
        }
示例#7
0
文件: MainForm.cs 项目: sword36/town
        //Vk vkapi;
        public MainForm()
        {
            happinessStat = new Statistics();
            BuildingInterfacesConsuming();

            /*Config.Workshops.Add(typeof(Factory));
            Config.Barracks.Add(typeof(Barracks));
            Config.Guilds.Add(typeof(ThievesGuild));
            Config.FoodProductions.Add(typeof(Farm));
            Config.Marketplaces.Add(typeof(Market));
            Config.Entertainments.Add(typeof(Tavern));
            Config.Residences.Add(typeof(House));*/

            InitializeComponent();
            DoubleBuffered = true;

            WindowState = FormWindowState.Normal;
            FormBorderStyle = FormBorderStyle.None;
            Bounds = Screen.PrimaryScreen.Bounds;

            town = new Town();

            //Forms
            settingsForm = new SettingsForm();

            //Timer
            animationTimer = new System.Windows.Forms.Timer();
            animationTimer.Interval = 1000 / Config.FPS;
            animationTimer.Enabled = true;
            animationTimer.Tick += AnimationTimer_Tick;
            lastTime = DateTime.Now.Ticks;
        }
示例#8
0
 public void InitTimer()
 {
     _timer = new Timer();
     _timer.Tick += new EventHandler(button1_Click);
     _timer.Interval = Convert.ToInt32(Options.Instance.TimerInterval);
     _timer.Start();
 }
示例#9
0
文件: test.cs 项目: mono/gert
	void MainForm_Load (object sender, EventArgs e)
	{
		_timer = new Timer ();
		_timer.Interval = 200;
		_timer.Enabled = true;
		_timer.Tick += new EventHandler (Timer_Tick);
	}
 private void InitializeXBox360Timer()
 {
     Timer timer = new Timer { Enabled = true };
     int guideCounter = 0;
     timer.Tick += (sender, args) =>
     {
         if (AnyGamepadHasButton(XBox360GamepadButton.Guide) && !IsVisible)
         {
             guideCounter++;
             if (guideCounter == 10)
             {
                 Show();
             }
         }
         else if (AnyGamepadHasButton(XBox360GamepadButton.B) && IsVisible)
         {
             Hide();
         }
         else if (AnyGamepadHasButton(XBox360GamepadButton.X) && IsVisible)
         {
             PowerOff();
         }
         else
         {
             guideCounter = 0;
         }
     };
 }
示例#11
0
 public CustomTextBox()
 {
     _timer = new Timer();
         _timer.Interval = 1000;
         _timer.Tick += timer_Tick;
         this.TextChanged += txt_TextChanged;
 }
示例#12
0
 public Menu(SquareList list)
 {
     children = list;
     myTimer = new Timer();
     myTimer.Interval = 90000;
     myTimer.Enabled = true;
 }
示例#13
0
 public MPXProcessor(ISharpControl control)
 {
     this._control = control;
       this._control.PropertyChanged += new PropertyChangedEventHandler(this.NotifyPropertyChangedHandler);
       this._fftTimer = new System.Windows.Forms.Timer();
       this._fftTimer.Tick += new EventHandler(this.fftTimer_Tick);
       this._fftTimer.Interval = 40;
       this._fftBins = 4096;
       this.InitFFTBuffers();
       this.BuildFFTWindow();
       this._spectrumAnalyzer = new SpectrumAnalyzer();
       this._spectrumAnalyzer.Dock = DockStyle.Fill;
       this._spectrumAnalyzer.Margin = new Padding(0, 0, 0, 0);
       this._spectrumAnalyzer.DisplayRange = 90;
       this._spectrumAnalyzer.EnableFilter = false;
       this._spectrumAnalyzer.EnableHotTracking = false;
       this._spectrumAnalyzer.EnableFrequencyMarker = false;
       this._spectrumAnalyzer.StepSize = 19000;
       this._spectrumAnalyzer.UseSmoothing = true;
       this._spectrumAnalyzer.SpectrumWidth = 100000;
       this._spectrumAnalyzer.Frequency = (long) (this._spectrumAnalyzer.SpectrumWidth / 2);
       this._spectrumAnalyzer.CenterFrequency = (long) (this._spectrumAnalyzer.SpectrumWidth / 2);
       this._spectrumAnalyzer.Attack = 0.9f;
       this._spectrumAnalyzer.Decay = 0.6f;
       this._spectrumAnalyzer.StatusText = "FM MPX Spectrum";
       this._spectrumAnalyzer.FrequencyChanged += new ManualFrequencyChangeEventHandler(this.spectrumAnalyzer_FrequencyChanged);
       this._spectrumAnalyzer.CenterFrequencyChanged += new ManualFrequencyChangeEventHandler(this.spectrumAnalyzer_CenterFrequencyChanged);
       this._spectrumAnalyzer.VisibleChanged += new EventHandler(this.spectrumAnalyzer_VisibleChanged);
       this._control.RegisterStreamHook((object) this, ProcessorType.FMMPX);
       this._control.RegisterFrontControl((UserControl) this._spectrumAnalyzer, (PluginPosition) Utils.GetIntSetting("zoomPosition", 1));
 }
示例#14
0
 public TimelineAutoLoader(TimelineController _controller)
 {
     controller = _controller;
     timer = new Timer();
     timer.Interval = 5000;
     timer.Tick += timer_CheckCurrentZone;
 }
        private void startButton_Click(object sender, EventArgs e)
        {
            SynchronizationContext ctx = SynchronizationContext.Current;
            

            // Save the new gesture name to gestureInfoNew.data
            string name = gestureName.Text;
            Gestures.addNewGesture(name);
            Gestures.saveData(GestureStudio.GesturesDataPathNew);
            Gestures.loadData(GestureStudio.GesturesDataPathNew);

            // Count down 5.
            int countDown = 5;
            System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
            timer.Interval = 1000;
            timer.Tick += (o, src) =>
                {
                    countDown--;
                    ctx.Post((state) =>
                        {
                            this.countDownLabel.Text = countDown.ToString();
                        }, null);

                    if (countDown == 0)
                    {
                        this.OnStart();
                        timer.Stop();
                        countDown = 5;
                        this.countDownLabel.Text = countDown.ToString();
                        this.gestureName.Text = "Name of the new gesture.";
                    }
                };

            timer.Start();
        }
        public FrmMain()
        {
            InitializeComponent();

            _timer = new Timer();
            _timer.Tick += timer_Tick;
        }
示例#17
0
        public void lightCycle()
        {
            lightTimer = new System.Windows.Forms.Timer();
            if (modelIntersection.gethRoadIntersection().getLightState() == RoadIntersection.GREEN_LIGHT)
            {
                lightTimer.Interval = (((((modelIntersection.getvRoadIntersection().getRoad().getNoLanes(Settings.TRAFFIC_EAST_SOUTH) + modelIntersection.gethRoadIntersection().getRoad().getNoLanes(Settings.TRAFFIC_WEST_NORTH)) * Settings.LANE_WIDTH) / Settings.CAR_MOVE) + Settings.CAR_LENGTH) * Settings.FRAME_LENGTH);
                modelIntersection.gethRoadIntersection().setLightState(RoadIntersection.YELLOW_LIGHT);
                lightTimer.Start();
                lightTimer.Tick += new EventHandler(lightTimer_Tick);
            }

            else if (modelIntersection.gethRoadIntersection().getLightState() == RoadIntersection.TURNING_GREEN_LIGHT)
            {
                lightTimer.Interval = (((((modelIntersection.gethRoadIntersection().getRoad().getNoLanes(Settings.TRAFFIC_EAST_SOUTH) + modelIntersection.gethRoadIntersection().getRoad().getNoLanes(Settings.TRAFFIC_WEST_NORTH)) * Settings.LANE_WIDTH) / Settings.CAR_MOVE) + Settings.CAR_LENGTH) * Settings.FRAME_LENGTH);
                modelIntersection.gethRoadIntersection().setLightState(RoadIntersection.TURNING_YELLOW_LIGHT);
                lightTimer.Start();
                lightTimer.Tick += new EventHandler(lightTimer_Tick);
            }

            else if (modelIntersection.getvRoadIntersection().getLightState() == RoadIntersection.GREEN_LIGHT)
            {
                lightTimer.Interval = (((((modelIntersection.gethRoadIntersection().getRoad().getNoLanes(Settings.TRAFFIC_EAST_SOUTH) + modelIntersection.gethRoadIntersection().getRoad().getNoLanes(Settings.TRAFFIC_WEST_NORTH)) * Settings.LANE_WIDTH) / Settings.CAR_MOVE) + Settings.CAR_LENGTH) * Settings.FRAME_LENGTH);
                modelIntersection.getvRoadIntersection().setLightState(RoadIntersection.YELLOW_LIGHT);
                lightTimer.Start();
                lightTimer.Tick += new EventHandler(lightTimer_Tick);
            }

            else if (modelIntersection.getvRoadIntersection().getLightState() == RoadIntersection.TURNING_GREEN_LIGHT)
            {
                lightTimer.Interval = (((((modelIntersection.gethRoadIntersection().getRoad().getNoLanes(Settings.TRAFFIC_EAST_SOUTH) + modelIntersection.gethRoadIntersection().getRoad().getNoLanes(Settings.TRAFFIC_WEST_NORTH)) * Settings.LANE_WIDTH) / Settings.CAR_MOVE) + Settings.CAR_LENGTH) * Settings.FRAME_LENGTH);
                modelIntersection.getvRoadIntersection().setLightState(RoadIntersection.TURNING_YELLOW_LIGHT);
                lightTimer.Start();
                lightTimer.Tick += new EventHandler(lightTimer_Tick);
            }
        }
示例#18
0
        //obiekt przechowujący obiekty ubiegające się o dostęp do wątku
        //private Object Sync;
        public MainForm()
        {
            InitializeComponent();

            //Sync = new Object();

            //domyślnie serwer jest wyłączony
            isRunning = false;
            timer = new System.Windows.Forms.Timer();
            timer.Interval = 1000;
            timer.Tick += new EventHandler(DisplayServerTime);
            timer.Start();

            //utworzenie gniazda serwera
            try
            {
                server = new TcpListener(IPAddress.Any, 8001);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Nie udało się utworzyć gniazda serwera. Dalsze korzystanie z aplikacji może generować błędy! Uruchom aplikację jeszcze raz.\nDebuger message:\n" + ex.ToString(), "Błąd tworzenia gniazda serwera!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            dataBase = new GlobalMySql();

            try
            {
                dataBase.Connection.Open();
            }
            catch
            {
                AddLog("Nie udało się nawiązać połączenia z bazą danych. Aplikacja nie będzie działać poprawanie.");
            }
        }
示例#19
0
 public Decode_Form()
 {
     InitializeComponent();
     passwordTimer = new Timer();
     passwordTimer.Interval = 6000;
     passwordTimer.Tick += new EventHandler(PasswordTimeOver);
 }
示例#20
0
        public PwBar()
        {
            InitializeComponent();
            tas = Program.TasClient;
            timerLabel.AutoSize = true;
            headerLabel.AutoSize = true;

            timer = new Timer();
            timer.Interval = 1000;
            timer.Tick += (sender, args) =>
            {
                if (Program.NotifySection.Contains(this)) timerLabel.Text = ZkData.Utils.PrintTimeRemaining((int)deadline.Subtract(DateTime.Now).TotalSeconds);
            };
            timer.Start();

            pnl.Controls.Add(timerLabel);
            pnl.Controls.Add(headerLabel);

            // TODO pw handling 
            /*tas.Extensions.JsonDataReceived += (sender, e) =>
            {
                var newPw = e as PwMatchCommand;
                if (newPw != null)
                {
                    pw = newPw;
                    UpdateGui();
                }
            };*/

            tas.MyUserStatusChanged += (sender, args) => UpdateGui();
        }
示例#21
0
        public MainForm()
        {
            InitializeComponent();

            if (!string.IsNullOrEmpty(Program.directory))
            {
                this.Text += "-[" + Program.directory + "]";
            }

            #if DEBUG
            diskSpaceCheckTimer.Interval = 1000 * 60;
            #endif

            config.GetLineCameras();
            Properties.Settings setting = Properties.Settings.Default;

            cpuCounter = new PerformanceCounter();
            ramCounter = new PerformanceCounter("Memory", "Available MBytes");

            cpuCounter.CategoryName = "Processor";
            cpuCounter.CounterName = "% Processor Time";
            cpuCounter.InstanceName = "_Total";

            time = new System.Windows.Forms.Timer();
            time.Tick += time_Elapsed;
            time.Interval = 3000;
            time.Enabled = true;

            InitStatusBar();
        }
示例#22
0
 private void InitTimeRemainingTimer()
 {
     Timer singleQuestionTimer = new Timer();
     singleQuestionTimer.Interval = 100;
     singleQuestionTimer.Tick += singleQuestionTimer_Tick;
     singleQuestionTimer.Start();
 }
示例#23
0
        public ApplicationContext()
        {
            if (Properties.Settings.Default.CallUpgrade)
              {
            Properties.Settings.Default.Upgrade();
            Properties.Settings.Default.CallUpgrade = false;
            Properties.Settings.Default.Save();
              }

              _components = new System.ComponentModel.Container();
              _notifyIcon = new NotifyIcon(_components)
              {
            ContextMenuStrip = new ContextMenuStrip(),
            Visible = true
              };
              _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("Settings", null, new EventHandler(MenuSettingsItem_Click)));
              _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("Exit", null, new EventHandler(MenuExitItem_Click)));

              _buddies = new Buddies();

              _housekeepingTimer = new System.Windows.Forms.Timer();
              _housekeepingTimer.Interval = 5000;
              _housekeepingTimer.Tick += HousekeepingTimer_Tick;
              HousekeepingTimer_Tick(null, null);     // tick anyway enables timer when finished

              _trackerStatus = TrackerStatus.OK;

              if (trackersConfigured())
              {
            _trackerStatus = TrackerStatus.UNKNOWN;
            UpdateTrackerSetting();
              }

              _viewModel = new ViewModel(_buddies);
        }
示例#24
0
		public MainForm(MainModel model)
			: this()
		{
			_model = model;
			_model.TrayIcon = _trayIcon;
			_presenter = new MainPresenter(this, model, SynchronizationContext.Current);
			_presenter.ConnectEvents();
			this.Closing += (sender, args) => _presenter.DisconnectEvents();
			
            _trayIconTimer = new Timer();
            _trayIconTimer.Interval = 750;
            _trayIconTimer.Tick += OnTrayIconTimerTick;

		    _shutdownTimer = new Timer();
		    _shutdownTimer.Interval = 20000;
            _shutdownTimer.Tick += ShutdownTimerOnTick;

			_progressView = new ProgressView(new ProgressModel(model.UploadManager));
			_processing = true;
			_trayIconTimer.Start();

			Logger.LogInfo("MainForm initialized.");
			if (_trayIcon != null)
				_trayIcon.SetTrayIconVisibility(true);

        }
		public MonitorConfigurationWatcher()
		{
			_checkTimer = new Timer();
			_checkTimer.Enabled = false;
			_checkTimer.Interval = 2500;
			_checkTimer.Tick += OnCheckTimerTick;
		}
示例#26
0
        private void btn_BLKWHTAUTO_Click(object sender, EventArgs e)
        {
            //:Let them know this is a larger operation.
              this.Text = "Please be patient, this is a larger comparison.";

              //:We do NOT want them clicking while the thread is running.
              ButtonsEnabled(false);
              btn_Refresh.Enabled    = false;
              btn_newIMG.Enabled     = false;
              btn_Export.Enabled     = false;
              btn_GRYSCL.Enabled     = false;
              btn_BLKWHT.Enabled     = false;
              nud_BWSCALE.Enabled    = false;
              btn_BLKWHTAUTO.Enabled = false;
              ready = false; //:Not ready to continue other functions. [excluding this]

              //:Start a timer along with a thread to multithread the process gargling AutoBW
              System.Windows.Forms.Timer t = new System.Windows.Forms.Timer();
              t.Interval = 1000;
              t.Tick += new EventHandler(t_Tick);

              Thread th = new Thread(new ThreadStart(BWAUTO_TH));
              t.Start();
              th.Start();
        }
示例#27
0
 /// <summary>
 /// Setups the timer that triggers the update loop
 /// </summary>
 private void SetupDrawLoop()
 {
     Timer timer = new Timer();
     timer.Interval = _updateIntervalMills;
     timer.Tick += TimerTick;
     timer.Start();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="StatusStripExtender"/> class.
        /// </summary>
        public StatusStripExtender()
        {
            _timer = new Timer { Enabled = false, Interval = _statusDefaultDuration };
            _timer.Tick += _timer_Tick;

            _toolTipList = new StringCollection();
        }
示例#29
0
文件: MainForm.cs 项目: JuRogn/OA
        private void MainForm_Load(Object sender, EventArgs e)
        {
            // bind connection Strings to the dropdown lists
            cboPersistenceService.DisplayMember = "Name";
            cboTrackingService.DisplayMember = "Name";
            foreach (ConnectionStringSettings connectionStringSetting in ConfigurationManager.ConnectionStrings)
            {
                cboPersistenceService.Items.Add(connectionStringSetting);
                cboTrackingService.Items.Add(connectionStringSetting);
            }

            cboTrackingService.Items.Insert(0, "None");

            if (cboPersistenceService.Items.Count > 0)
                cboPersistenceService.SelectedIndex = 0;

            if (cboTrackingService.Items.Count > 0)
                cboTrackingService.SelectedIndex = 0;

            // configure delegate trace listener
            DelegateTraceListener traceListener = new DelegateTraceListener();
            traceListener.WriteDelegate += traceListener_WriteDelegate;
            traceListener.WriteLineDelegate += traceListener_WriteDelegate;
            Trace.Listeners.Add(traceListener);

            // and the timer to flush messages to the message box
            traceDelegate = traceToMessageBox;
            timer = new Timer();
            timer.Interval = 1000;
            timer.Tick += timer_Tick;
            timer.Start();
        }
示例#30
0
 static GameTime()
 {
     _staticReference = new GameTime();
     game = new Timer();
     game.Interval = 30;
     game.Tick += game_Tick;
 }
示例#31
0
            public void StartPan(PanelSourceData.PanelGetDate[] ar_panels)
            {
                int err = -1; //Признак выполнения метода/функции
                //Зарегистрировать соединение/получить идентификатор соединения
                int iListenerId = DbSources.Sources().Register(FormMain.s_listFormConnectionSettings[(int)CONN_SETT_TYPE.CONFIG_DB].getConnSett(), false, @"CONFIG_DB");

                DbConnection dbConn = null;

                dbConn = DbSources.Sources().GetConnection(iListenerId, out err);

                if ((err == 0) && (!(dbConn == null)))
                {
                    m_tableSourceData = DbTSQLInterface.Select(ref dbConn, @"SELECT * FROM source", null, null, out err);

                    if (err == 0)
                    {
                        if (m_tableSourceData.Rows.Count > 0)
                        {
                            int i = -1
                            , j   = -1;
                            for (i = 0; i < INDEX_SOURCE_GETDATE.Length; i++)
                            {
                                ar_panels[i].EvtAskedData += new DelegateObjectFunc(onEvtQueryAskedData);
                                for (j = 0; j < m_tableSourceData.Rows.Count; j++)
                                {
                                    ar_panels[i].AddSourceData(m_tableSourceData.Rows[j][@"NAME_SHR"].ToString());
                                }
                            }
                        }
                        else
                        {
                            ;
                        }
                    }
                    else
                    {
                        ;
                    }
                }
                else
                {
                    throw new Exception(@"Нет соединения с БД");
                }

                DbSources.Sources().UnRegister(iListenerId);

                for (int i = 0; i < INDEX_SOURCE_GETDATE.Length; i++)
                {
                    ar_panels[i].Start();
                    //m_arPanels[i].TurnOn(INDEX_SOURCE_GETDATE [i]);
                    ar_panels[i].Select(INDEX_SOURCE_GETDATE[i]);
                }

                //Выбрать действие
                lock (m_lockTimerGetDate)
                {
                    if (this.Actived == true)
                    {//Запустить поток
                        if (m_timerGetDate == null)
                        {
                            m_timerGetDate = new
                                             //System.Threading.Timer(fThreadGetDate)
                                             System.Windows.Forms.Timer()
                            ;
                            m_timerGetDate.Tick    += new EventHandler(fThreadGetDate);
                            m_timerGetDate.Interval = 1000;
                        }
                        else
                        {
                            ;
                        }

                        //m_timerGetDate.Change(0, System.Threading.Timeout.Infinite);
                        m_timerGetDate.Start();
                    }
                    else
                    {
                        //Остановить поток
                        stop();
                    }
                }

                for (int i = 0; i < m_ar_panels.Length; i++)
                {
                    m_ar_panels[i].Activate(this.Actived);
                }
            }
示例#32
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.panel1                  = new System.Windows.Forms.Panel();
     this.button2                 = new System.Windows.Forms.Button();
     this.l2                      = new System.Windows.Forms.Label();
     this.l1                      = new System.Windows.Forms.Label();
     this.label2                  = new System.Windows.Forms.Label();
     this.label1                  = new System.Windows.Forms.Label();
     this.button1                 = new System.Windows.Forms.Button();
     this.pictureBox1             = new System.Windows.Forms.PictureBox();
     this.pictureBox2             = new System.Windows.Forms.PictureBox();
     this.pictureBox3             = new System.Windows.Forms.PictureBox();
     this.pictureBox4             = new System.Windows.Forms.PictureBox();
     this.pictureBox5             = new System.Windows.Forms.PictureBox();
     this.pictureBox6             = new System.Windows.Forms.PictureBox();
     this.pictureBox7             = new System.Windows.Forms.PictureBox();
     this.pictureBox8             = new System.Windows.Forms.PictureBox();
     this.pictureBox9             = new System.Windows.Forms.PictureBox();
     this.pictureBox10            = new System.Windows.Forms.PictureBox();
     this.pictureBox11            = new System.Windows.Forms.PictureBox();
     this.pictureBox12            = new System.Windows.Forms.PictureBox();
     this.pictureBox13            = new System.Windows.Forms.PictureBox();
     this.pictureBox14            = new System.Windows.Forms.PictureBox();
     this.pictureBox15            = new System.Windows.Forms.PictureBox();
     this.pictureBox16            = new System.Windows.Forms.PictureBox();
     this.pictureBox17            = new System.Windows.Forms.PictureBox();
     this.pictureBox18            = new System.Windows.Forms.PictureBox();
     this.pictureBox19            = new System.Windows.Forms.PictureBox();
     this.pictureBox20            = new System.Windows.Forms.PictureBox();
     this.timer1                  = new System.Windows.Forms.Timer(this.components);
     this.menuStrip1              = new System.Windows.Forms.MenuStrip();
     this.fileToolStripMenuItem   = new System.Windows.Forms.ToolStripMenuItem();
     this.exitToolStripMenuItem   = new System.Windows.Forms.ToolStripMenuItem();
     this.aboutToolStripMenuItem  = new System.Windows.Forms.ToolStripMenuItem();
     this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox13)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox14)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox15)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox16)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox17)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox19)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox20)).BeginInit();
     this.menuStrip1.SuspendLayout();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.BackColor = System.Drawing.Color.Ivory;
     this.panel1.Controls.Add(this.button2);
     this.panel1.Controls.Add(this.l2);
     this.panel1.Controls.Add(this.l1);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.button1);
     this.panel1.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.panel1.Location = new System.Drawing.Point(0, 494);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(482, 32);
     this.panel1.TabIndex = 20;
     //
     // button2
     //
     this.button2.BackColor = System.Drawing.Color.SteelBlue;
     this.button2.Location  = new System.Drawing.Point(936, 5);
     this.button2.Name      = "button2";
     this.button2.Size      = new System.Drawing.Size(64, 24);
     this.button2.TabIndex  = 5;
     this.button2.Text      = "Exit";
     this.button2.UseVisualStyleBackColor = false;
     this.button2.Click += new System.EventHandler(this.button2_Click);
     //
     // l2
     //
     this.l2.AutoSize  = true;
     this.l2.BackColor = System.Drawing.Color.LightYellow;
     this.l2.Location  = new System.Drawing.Point(413, 8);
     this.l2.Name      = "l2";
     this.l2.Size      = new System.Drawing.Size(13, 13);
     this.l2.TabIndex  = 4;
     this.l2.Text      = "0";
     //
     // l1
     //
     this.l1.AutoSize  = true;
     this.l1.BackColor = System.Drawing.Color.LightYellow;
     this.l1.Location  = new System.Drawing.Point(232, 10);
     this.l1.Name      = "l1";
     this.l1.Size      = new System.Drawing.Size(13, 13);
     this.l1.TabIndex  = 3;
     this.l1.Text      = "0";
     //
     // label2
     //
     this.label2.AutoSize  = true;
     this.label2.BackColor = System.Drawing.Color.LightYellow;
     this.label2.Location  = new System.Drawing.Point(349, 8);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(48, 13);
     this.label2.TabIndex  = 2;
     this.label2.Text      = "Player 2:";
     //
     // label1
     //
     this.label1.AutoSize  = true;
     this.label1.BackColor = System.Drawing.Color.LightYellow;
     this.label1.Location  = new System.Drawing.Point(168, 10);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(48, 13);
     this.label1.TabIndex  = 1;
     this.label1.Text      = "Player 1:";
     //
     // button1
     //
     this.button1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
     this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.button1.Location  = new System.Drawing.Point(15, 4);
     this.button1.Name      = "button1";
     this.button1.Size      = new System.Drawing.Size(64, 24);
     this.button1.TabIndex  = 0;
     this.button1.Text      = "New";
     this.button1.UseVisualStyleBackColor = false;
     this.button1.Click += new System.EventHandler(this.button1_Click);
     //
     // pictureBox1
     //
     this.pictureBox1.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox1.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
     this.pictureBox1.Location    = new System.Drawing.Point(12, 46);
     this.pictureBox1.Name        = "pictureBox1";
     this.pictureBox1.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox1.TabIndex    = 21;
     this.pictureBox1.TabStop     = false;
     this.pictureBox1.Click      += new System.EventHandler(this.pictureBox1_Click);
     //
     // pictureBox2
     //
     this.pictureBox2.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox2.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
     this.pictureBox2.Location    = new System.Drawing.Point(108, 46);
     this.pictureBox2.Name        = "pictureBox2";
     this.pictureBox2.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox2.TabIndex    = 22;
     this.pictureBox2.TabStop     = false;
     this.pictureBox2.Click      += new System.EventHandler(this.pictureBox2_Click);
     //
     // pictureBox3
     //
     this.pictureBox3.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox3.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
     this.pictureBox3.Location    = new System.Drawing.Point(204, 46);
     this.pictureBox3.Name        = "pictureBox3";
     this.pictureBox3.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox3.TabIndex    = 23;
     this.pictureBox3.TabStop     = false;
     this.pictureBox3.Click      += new System.EventHandler(this.pictureBox3_Click);
     //
     // pictureBox4
     //
     this.pictureBox4.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox4.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
     this.pictureBox4.Location    = new System.Drawing.Point(300, 46);
     this.pictureBox4.Name        = "pictureBox4";
     this.pictureBox4.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox4.TabIndex    = 24;
     this.pictureBox4.TabStop     = false;
     this.pictureBox4.Click      += new System.EventHandler(this.pictureBox4_Click);
     //
     // pictureBox5
     //
     this.pictureBox5.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox5.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image")));
     this.pictureBox5.Location    = new System.Drawing.Point(396, 46);
     this.pictureBox5.Name        = "pictureBox5";
     this.pictureBox5.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox5.TabIndex    = 25;
     this.pictureBox5.TabStop     = false;
     this.pictureBox5.Click      += new System.EventHandler(this.pictureBox5_Click);
     //
     // pictureBox6
     //
     this.pictureBox6.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox6.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox6.Image")));
     this.pictureBox6.Location    = new System.Drawing.Point(12, 158);
     this.pictureBox6.Name        = "pictureBox6";
     this.pictureBox6.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox6.TabIndex    = 26;
     this.pictureBox6.TabStop     = false;
     this.pictureBox6.Click      += new System.EventHandler(this.pictureBox6_Click);
     //
     // pictureBox7
     //
     this.pictureBox7.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox7.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox7.Image")));
     this.pictureBox7.Location    = new System.Drawing.Point(108, 158);
     this.pictureBox7.Name        = "pictureBox7";
     this.pictureBox7.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox7.TabIndex    = 27;
     this.pictureBox7.TabStop     = false;
     this.pictureBox7.Click      += new System.EventHandler(this.pictureBox7_Click);
     //
     // pictureBox8
     //
     this.pictureBox8.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox8.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox8.Image")));
     this.pictureBox8.Location    = new System.Drawing.Point(204, 158);
     this.pictureBox8.Name        = "pictureBox8";
     this.pictureBox8.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox8.TabIndex    = 28;
     this.pictureBox8.TabStop     = false;
     this.pictureBox8.Click      += new System.EventHandler(this.pictureBox8_Click);
     //
     // pictureBox9
     //
     this.pictureBox9.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox9.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox9.Image")));
     this.pictureBox9.Location    = new System.Drawing.Point(300, 158);
     this.pictureBox9.Name        = "pictureBox9";
     this.pictureBox9.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox9.TabIndex    = 29;
     this.pictureBox9.TabStop     = false;
     this.pictureBox9.Click      += new System.EventHandler(this.pictureBox9_Click);
     //
     // pictureBox10
     //
     this.pictureBox10.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox10.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox10.Image")));
     this.pictureBox10.Location    = new System.Drawing.Point(396, 158);
     this.pictureBox10.Name        = "pictureBox10";
     this.pictureBox10.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox10.TabIndex    = 30;
     this.pictureBox10.TabStop     = false;
     this.pictureBox10.Click      += new System.EventHandler(this.pictureBox10_Click);
     //
     // pictureBox11
     //
     this.pictureBox11.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox11.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox11.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox11.Image")));
     this.pictureBox11.Location    = new System.Drawing.Point(12, 270);
     this.pictureBox11.Name        = "pictureBox11";
     this.pictureBox11.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox11.TabIndex    = 31;
     this.pictureBox11.TabStop     = false;
     this.pictureBox11.Click      += new System.EventHandler(this.pictureBox11_Click);
     //
     // pictureBox12
     //
     this.pictureBox12.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox12.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox12.Image")));
     this.pictureBox12.Location    = new System.Drawing.Point(108, 270);
     this.pictureBox12.Name        = "pictureBox12";
     this.pictureBox12.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox12.TabIndex    = 32;
     this.pictureBox12.TabStop     = false;
     this.pictureBox12.Click      += new System.EventHandler(this.pictureBox12_Click);
     //
     // pictureBox13
     //
     this.pictureBox13.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox13.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox13.Image")));
     this.pictureBox13.Location    = new System.Drawing.Point(204, 270);
     this.pictureBox13.Name        = "pictureBox13";
     this.pictureBox13.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox13.TabIndex    = 33;
     this.pictureBox13.TabStop     = false;
     this.pictureBox13.Click      += new System.EventHandler(this.pictureBox13_Click);
     //
     // pictureBox14
     //
     this.pictureBox14.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox14.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox14.Image")));
     this.pictureBox14.Location    = new System.Drawing.Point(300, 270);
     this.pictureBox14.Name        = "pictureBox14";
     this.pictureBox14.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox14.TabIndex    = 34;
     this.pictureBox14.TabStop     = false;
     this.pictureBox14.Click      += new System.EventHandler(this.pictureBox14_Click);
     //
     // pictureBox15
     //
     this.pictureBox15.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox15.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox15.Image")));
     this.pictureBox15.Location    = new System.Drawing.Point(396, 270);
     this.pictureBox15.Name        = "pictureBox15";
     this.pictureBox15.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox15.TabIndex    = 35;
     this.pictureBox15.TabStop     = false;
     this.pictureBox15.Click      += new System.EventHandler(this.pictureBox15_Click);
     //
     // pictureBox16
     //
     this.pictureBox16.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox16.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox16.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox16.Image")));
     this.pictureBox16.Location    = new System.Drawing.Point(12, 382);
     this.pictureBox16.Name        = "pictureBox16";
     this.pictureBox16.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox16.TabIndex    = 36;
     this.pictureBox16.TabStop     = false;
     this.pictureBox16.Click      += new System.EventHandler(this.pictureBox16_Click);
     //
     // pictureBox17
     //
     this.pictureBox17.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox17.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox17.Image")));
     this.pictureBox17.Location    = new System.Drawing.Point(108, 382);
     this.pictureBox17.Name        = "pictureBox17";
     this.pictureBox17.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox17.TabIndex    = 37;
     this.pictureBox17.TabStop     = false;
     this.pictureBox17.Click      += new System.EventHandler(this.pictureBox17_Click);
     //
     // pictureBox18
     //
     this.pictureBox18.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox18.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox18.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox18.Image")));
     this.pictureBox18.Location    = new System.Drawing.Point(204, 382);
     this.pictureBox18.Name        = "pictureBox18";
     this.pictureBox18.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox18.TabIndex    = 38;
     this.pictureBox18.TabStop     = false;
     this.pictureBox18.Click      += new System.EventHandler(this.pictureBox18_Click);
     //
     // pictureBox19
     //
     this.pictureBox19.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox19.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox19.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox19.Image")));
     this.pictureBox19.Location    = new System.Drawing.Point(300, 382);
     this.pictureBox19.Name        = "pictureBox19";
     this.pictureBox19.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox19.TabIndex    = 39;
     this.pictureBox19.TabStop     = false;
     this.pictureBox19.Click      += new System.EventHandler(this.pictureBox19_Click);
     //
     // pictureBox20
     //
     this.pictureBox20.BackColor   = System.Drawing.Color.DarkGreen;
     this.pictureBox20.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pictureBox20.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox20.Image")));
     this.pictureBox20.Location    = new System.Drawing.Point(396, 382);
     this.pictureBox20.Name        = "pictureBox20";
     this.pictureBox20.Size        = new System.Drawing.Size(72, 96);
     this.pictureBox20.TabIndex    = 40;
     this.pictureBox20.TabStop     = false;
     this.pictureBox20.Click      += new System.EventHandler(this.pictureBox20_Click);
     //
     // timer1
     //
     this.timer1.Interval = 150;
     this.timer1.Tick    += new System.EventHandler(this.timer1_Tick);
     //
     // menuStrip1
     //
     this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.fileToolStripMenuItem,
         this.aboutToolStripMenuItem
     });
     this.menuStrip1.Location = new System.Drawing.Point(0, 0);
     this.menuStrip1.Name     = "menuStrip1";
     this.menuStrip1.Size     = new System.Drawing.Size(482, 24);
     this.menuStrip1.TabIndex = 41;
     this.menuStrip1.Text     = "menuStrip1";
     //
     // fileToolStripMenuItem
     //
     this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.exitToolStripMenuItem
     });
     this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
     this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
     this.fileToolStripMenuItem.Text = "File";
     //
     // exitToolStripMenuItem
     //
     this.exitToolStripMenuItem.Name   = "exitToolStripMenuItem";
     this.exitToolStripMenuItem.Size   = new System.Drawing.Size(152, 22);
     this.exitToolStripMenuItem.Text   = "Exit";
     this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
     //
     // aboutToolStripMenuItem
     //
     this.aboutToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.aboutToolStripMenuItem1
     });
     this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
     this.aboutToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
     this.aboutToolStripMenuItem.Text = "Help";
     //
     // aboutToolStripMenuItem1
     //
     this.aboutToolStripMenuItem1.Name   = "aboutToolStripMenuItem1";
     this.aboutToolStripMenuItem1.Size   = new System.Drawing.Size(152, 22);
     this.aboutToolStripMenuItem1.Text   = "About";
     this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackColor         = System.Drawing.Color.AliceBlue;
     this.ClientSize        = new System.Drawing.Size(482, 526);
     this.Controls.Add(this.pictureBox20);
     this.Controls.Add(this.pictureBox19);
     this.Controls.Add(this.pictureBox18);
     this.Controls.Add(this.pictureBox17);
     this.Controls.Add(this.pictureBox16);
     this.Controls.Add(this.pictureBox15);
     this.Controls.Add(this.pictureBox14);
     this.Controls.Add(this.pictureBox13);
     this.Controls.Add(this.pictureBox12);
     this.Controls.Add(this.pictureBox11);
     this.Controls.Add(this.pictureBox10);
     this.Controls.Add(this.pictureBox9);
     this.Controls.Add(this.pictureBox8);
     this.Controls.Add(this.pictureBox7);
     this.Controls.Add(this.pictureBox6);
     this.Controls.Add(this.pictureBox5);
     this.Controls.Add(this.pictureBox4);
     this.Controls.Add(this.pictureBox3);
     this.Controls.Add(this.pictureBox2);
     this.Controls.Add(this.pictureBox1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.menuStrip1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
     this.MainMenuStrip   = this.menuStrip1;
     this.Name            = "Form1";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text            = "   A kind of Game";
     this.Load           += new System.EventHandler(this.Form1_Load);
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox13)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox14)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox15)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox16)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox17)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox19)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox20)).EndInit();
     this.menuStrip1.ResumeLayout(false);
     this.menuStrip1.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#33
0
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmUpdateWarning));
     this.components  = new System.ComponentModel.Container();
     this.ToolTip1    = new System.Windows.Forms.ToolTip(components);
     this.cmdClose    = new System.Windows.Forms.Button();
     this.cmdPrint    = new System.Windows.Forms.Button();
     this.cmdContinue = new System.Windows.Forms.Button();
     this.tmrStart    = new System.Windows.Forms.Timer(components);
     this.lblDesc     = new System.Windows.Forms.Label();
     this.SuspendLayout();
     this.ToolTip1.Active              = true;
     this.FormBorderStyle              = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Text                         = "Update Warning ...";
     this.ClientSize                   = new System.Drawing.Size(468, 258);
     this.Location                     = new System.Drawing.Point(3, 29);
     this.ControlBox                   = false;
     this.MaximizeBox                  = false;
     this.MinimizeBox                  = false;
     this.ShowInTaskbar                = false;
     this.StartPosition                = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.AutoScaleMode                = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor                    = System.Drawing.SystemColors.Control;
     this.Enabled                      = true;
     this.KeyPreview                   = false;
     this.Cursor                       = System.Windows.Forms.Cursors.Default;
     this.RightToLeft                  = System.Windows.Forms.RightToLeft.No;
     this.HelpButton                   = false;
     this.WindowState                  = System.Windows.Forms.FormWindowState.Normal;
     this.Name                         = "frmUpdateWarning";
     this.cmdClose.TextAlign           = System.Drawing.ContentAlignment.MiddleCenter;
     this.cmdClose.Text                = "Cancel the Update of Point Of Sale";
     this.cmdClose.Size                = new System.Drawing.Size(130, 37);
     this.cmdClose.Location            = new System.Drawing.Point(309, 204);
     this.cmdClose.TabIndex            = 1;
     this.cmdClose.BackColor           = System.Drawing.SystemColors.Control;
     this.cmdClose.CausesValidation    = true;
     this.cmdClose.Enabled             = true;
     this.cmdClose.ForeColor           = System.Drawing.SystemColors.ControlText;
     this.cmdClose.Cursor              = System.Windows.Forms.Cursors.Default;
     this.cmdClose.RightToLeft         = System.Windows.Forms.RightToLeft.No;
     this.cmdClose.TabStop             = true;
     this.cmdClose.Name                = "cmdClose";
     this.cmdPrint.TextAlign           = System.Drawing.ContentAlignment.MiddleCenter;
     this.cmdPrint.Text                = "Print List";
     this.cmdPrint.Size                = new System.Drawing.Size(130, 37);
     this.cmdPrint.Location            = new System.Drawing.Point(171, 204);
     this.cmdPrint.TabIndex            = 0;
     this.cmdPrint.BackColor           = System.Drawing.SystemColors.Control;
     this.cmdPrint.CausesValidation    = true;
     this.cmdPrint.Enabled             = true;
     this.cmdPrint.ForeColor           = System.Drawing.SystemColors.ControlText;
     this.cmdPrint.Cursor              = System.Windows.Forms.Cursors.Default;
     this.cmdPrint.RightToLeft         = System.Windows.Forms.RightToLeft.No;
     this.cmdPrint.TabStop             = true;
     this.cmdPrint.Name                = "cmdPrint";
     this.cmdContinue.TextAlign        = System.Drawing.ContentAlignment.MiddleCenter;
     this.cmdContinue.Text             = "Continue with the Update of Point Of Sale";
     this.cmdContinue.Size             = new System.Drawing.Size(130, 37);
     this.cmdContinue.Location         = new System.Drawing.Point(33, 204);
     this.cmdContinue.TabIndex         = 2;
     this.cmdContinue.BackColor        = System.Drawing.SystemColors.Control;
     this.cmdContinue.CausesValidation = true;
     this.cmdContinue.Enabled          = true;
     this.cmdContinue.ForeColor        = System.Drawing.SystemColors.ControlText;
     this.cmdContinue.Cursor           = System.Windows.Forms.Cursors.Default;
     this.cmdContinue.RightToLeft      = System.Windows.Forms.RightToLeft.No;
     this.cmdContinue.TabStop          = true;
     this.cmdContinue.Name             = "cmdContinue";
     this.tmrStart.Interval            = 10;
     this.tmrStart.Enabled             = true;
     this.lblDesc.BackColor            = System.Drawing.Color.White;
     this.lblDesc.Text                 = "There are 47 catalogue prices where your price is equal or less that the products cost price.";
     this.lblDesc.ForeColor            = System.Drawing.Color.Red;
     this.lblDesc.Size                 = new System.Drawing.Size(409, 172);
     this.lblDesc.Location             = new System.Drawing.Point(30, 12);
     this.lblDesc.TabIndex             = 3;
     this.lblDesc.TextAlign            = System.Drawing.ContentAlignment.TopLeft;
     this.lblDesc.Enabled              = true;
     this.lblDesc.Cursor               = System.Windows.Forms.Cursors.Default;
     this.lblDesc.RightToLeft          = System.Windows.Forms.RightToLeft.No;
     this.lblDesc.UseMnemonic          = true;
     this.lblDesc.Visible              = true;
     this.lblDesc.AutoSize             = false;
     this.lblDesc.BorderStyle          = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblDesc.Name                 = "lblDesc";
     this.Controls.Add(cmdClose);
     this.Controls.Add(cmdPrint);
     this.Controls.Add(cmdContinue);
     this.Controls.Add(lblDesc);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#34
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.btnStart    = new System.Windows.Forms.Button();
     this.btnStop     = new System.Windows.Forms.Button();
     this.lblStart    = new System.Windows.Forms.Label();
     this.lblStop     = new System.Windows.Forms.Label();
     this.label3      = new System.Windows.Forms.Label();
     this.label4      = new System.Windows.Forms.Label();
     this.lblSettings = new System.Windows.Forms.Label();
     this.btnSettings = new System.Windows.Forms.Button();
     this.timer1      = new System.Windows.Forms.Timer(this.components);
     this.SuspendLayout();
     //
     // btnStart
     //
     this.btnStart.Image     = ((System.Drawing.Image)(resources.GetObject("btnStart.Image")));
     this.btnStart.Location  = new System.Drawing.Point(69, 40);
     this.btnStart.Name      = "btnStart";
     this.btnStart.Size      = new System.Drawing.Size(32, 32);
     this.btnStart.TabIndex  = 1;
     this.btnStart.TabStop   = false;
     this.btnStart.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
     this.btnStart.Click    += new System.EventHandler(this.btnStart_Click);
     //
     // btnStop
     //
     this.btnStop.Image     = ((System.Drawing.Image)(resources.GetObject("btnStop.Image")));
     this.btnStop.Location  = new System.Drawing.Point(69, 80);
     this.btnStop.Name      = "btnStop";
     this.btnStop.Size      = new System.Drawing.Size(32, 32);
     this.btnStop.TabIndex  = 3;
     this.btnStop.TabStop   = false;
     this.btnStop.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
     this.btnStop.Click    += new System.EventHandler(this.btnStop_Click);
     //
     // lblStart
     //
     this.lblStart.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblStart.Location = new System.Drawing.Point(109, 48);
     this.lblStart.Name     = "lblStart";
     this.lblStart.Size     = new System.Drawing.Size(57, 23);
     this.lblStart.TabIndex = 2;
     this.lblStart.Text     = "Start";
     //
     // lblStop
     //
     this.lblStop.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblStop.Location = new System.Drawing.Point(109, 88);
     this.lblStop.Name     = "lblStop";
     this.lblStop.Size     = new System.Drawing.Size(57, 23);
     this.lblStop.TabIndex = 4;
     this.lblStop.Text     = "Stop";
     //
     // label3
     //
     this.label3.Font      = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.label3.ForeColor = System.Drawing.Color.Navy;
     this.label3.Location  = new System.Drawing.Point(9, 8);
     this.label3.Name      = "label3";
     this.label3.Size      = new System.Drawing.Size(216, 23);
     this.label3.TabIndex  = 0;
     this.label3.Text      = "Cassini Service Manager";
     this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
     //
     // label4
     //
     this.label4.Dock      = System.Windows.Forms.DockStyle.Bottom;
     this.label4.ForeColor = System.Drawing.Color.Green;
     this.label4.Location  = new System.Drawing.Point(0, 161);
     this.label4.Name      = "label4";
     this.label4.Size      = new System.Drawing.Size(234, 23);
     this.label4.TabIndex  = 7;
     this.label4.Text      = "Bart De Smet - 2004 - www.bartdesmet.net";
     //
     // lblSettings
     //
     this.lblSettings.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblSettings.Location = new System.Drawing.Point(109, 128);
     this.lblSettings.Name     = "lblSettings";
     this.lblSettings.Size     = new System.Drawing.Size(57, 23);
     this.lblSettings.TabIndex = 6;
     this.lblSettings.Text     = "Settings";
     //
     // btnSettings
     //
     this.btnSettings.Image     = ((System.Drawing.Image)(resources.GetObject("btnSettings.Image")));
     this.btnSettings.Location  = new System.Drawing.Point(69, 120);
     this.btnSettings.Name      = "btnSettings";
     this.btnSettings.Size      = new System.Drawing.Size(32, 32);
     this.btnSettings.TabIndex  = 5;
     this.btnSettings.TabStop   = false;
     this.btnSettings.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
     this.btnSettings.Click    += new System.EventHandler(this.btnSettings_Click);
     //
     // timer1
     //
     this.timer1.Enabled  = true;
     this.timer1.Interval = 500;
     this.timer1.Tick    += new System.EventHandler(this.timer1_Tick);
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(234, 184);
     this.Controls.Add(this.lblSettings);
     this.Controls.Add(this.btnSettings);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.lblStop);
     this.Controls.Add(this.lblStart);
     this.Controls.Add(this.btnStop);
     this.Controls.Add(this.btnStart);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "Form1";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text            = "Cassini Service Manager";
     this.Closing        += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
     this.Load           += new System.EventHandler(this.Form1_Load);
     this.ResumeLayout(false);
 }
 [System.Diagnostics.DebuggerStepThrough()] private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.Load      += new EventHandler(this.frmSplash_Load);
     System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
     System.Resources.ResourceManager       resources = new System.Resources.ResourceManager(typeof(frmSplash));
     this.ProgressBar1        = new System.Windows.Forms.ProgressBar();
     this.ProgressBar1.Click += new EventHandler(this.ProgressBar1_Click);
     this.Timer1              = new System.Windows.Forms.Timer(this.components);
     this.Timer1.Tick        += new EventHandler(this.Timer1_Tick);
     this.lblSoftName         = new System.Windows.Forms.Label();
     this.lblCompany          = new System.Windows.Forms.Label();
     this.lblVersion          = new System.Windows.Forms.Label();
     this.lblCopyRight        = new System.Windows.Forms.Label();
     this.SuspendLayout();
     //
     //ProgressBar1
     //
     this.ProgressBar1.Location = new System.Drawing.Point(4, 190);
     this.ProgressBar1.Name     = "ProgressBar1";
     this.ProgressBar1.Size     = new System.Drawing.Size(425, 12);
     this.ProgressBar1.TabIndex = 1;
     //
     //Timer1
     //
     this.Timer1.Enabled  = ((bool)(configurationAppSettings.GetValue("Timer1.Enabled", typeof(System.Boolean))));
     this.Timer1.Interval = ((int)(configurationAppSettings.GetValue("Timer1.Interval", typeof(System.Int32))));
     //
     //lblSoftName
     //
     this.lblSoftName.BackColor = System.Drawing.Color.Transparent;
     this.lblSoftName.Font      = new System.Drawing.Font("Monotype Corsiva", System.Convert.ToSingle(20.25), (System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblSoftName.ForeColor = System.Drawing.Color.DodgerBlue;
     this.lblSoftName.Location  = new System.Drawing.Point(126, 52);
     this.lblSoftName.Name      = "lblSoftName";
     this.lblSoftName.Size      = new System.Drawing.Size(294, 35);
     this.lblSoftName.TabIndex  = 2;
     this.lblSoftName.Text      = "SoftName";
     //
     //lblCompany
     //
     this.lblCompany.BackColor = System.Drawing.Color.Transparent;
     this.lblCompany.Font      = new System.Drawing.Font("Monotype Corsiva", System.Convert.ToSingle(11.25), System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblCompany.ForeColor = System.Drawing.Color.OrangeRed;
     this.lblCompany.Location  = new System.Drawing.Point(25, 20);
     this.lblCompany.Name      = "lblCompany";
     this.lblCompany.Size      = new System.Drawing.Size(383, 20);
     this.lblCompany.TabIndex  = 3;
     this.lblCompany.Text      = "Company";
     //
     //lblVersion
     //
     this.lblVersion.BackColor = System.Drawing.Color.Transparent;
     this.lblVersion.Font      = new System.Drawing.Font("Times New Roman", System.Convert.ToSingle(12.0), System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblVersion.ForeColor = System.Drawing.Color.Green;
     this.lblVersion.Location  = new System.Drawing.Point(267, 94);
     this.lblVersion.Name      = "lblVersion";
     this.lblVersion.Size      = new System.Drawing.Size(152, 20);
     this.lblVersion.TabIndex  = 4;
     this.lblVersion.Text      = "Version";
     //
     //lblCopyRight
     //
     this.lblCopyRight.BackColor = System.Drawing.Color.Transparent;
     this.lblCopyRight.Font      = new System.Drawing.Font("Times New Roman", System.Convert.ToSingle(9.0), System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblCopyRight.ForeColor = System.Drawing.Color.DeepPink;
     this.lblCopyRight.Location  = new System.Drawing.Point(8, 213);
     this.lblCopyRight.Name      = "lblCopyRight";
     this.lblCopyRight.Size      = new System.Drawing.Size(418, 20);
     this.lblCopyRight.TabIndex  = 5;
     this.lblCopyRight.Text      = "CopyRight";
     //
     //frmSplash
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackgroundImage   = ((System.Drawing.Bitmap)(resources.GetObject("$this.BackgroundImage")));
     this.ClientSize        = new System.Drawing.Size(434, 242);
     this.ControlBox        = false;
     this.Controls.AddRange(new System.Windows.Forms.Control[] { this.lblCopyRight, this.lblVersion, this.lblCompany, this.lblSoftName, this.ProgressBar1 });
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.ImeMode         = System.Windows.Forms.ImeMode.On;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "frmSplash";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text            = "JewelBox2004 is LOADING";
     this.ResumeLayout(false);
 }
示例#36
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.richTextBox1     = new System.Windows.Forms.RichTextBox();
     this.pictureBox1      = new System.Windows.Forms.PictureBox();
     this.pictureBox2      = new System.Windows.Forms.PictureBox();
     this.pictureBox_setup = new System.Windows.Forms.PictureBox();
     this.pictureBox_dial  = new System.Windows.Forms.PictureBox();
     this.pictureBox_hup   = new System.Windows.Forms.PictureBox();
     this.pictureBox_set   = new System.Windows.Forms.PictureBox();
     this.pictureBox_about = new System.Windows.Forms.PictureBox();
     this.pictureBox_help  = new System.Windows.Forms.PictureBox();
     this.pictureBox_exit  = new System.Windows.Forms.PictureBox();
     this.contextMenu1     = new System.Windows.Forms.ContextMenu();
     this.menuItem5        = new System.Windows.Forms.MenuItem();
     this.menuItem4        = new System.Windows.Forms.MenuItem();
     this.menuItem2        = new System.Windows.Forms.MenuItem();
     this.menuItem1        = new System.Windows.Forms.MenuItem();
     this.menuItem6        = new System.Windows.Forms.MenuItem();
     this.menuItem7        = new System.Windows.Forms.MenuItem();
     this.menuItem3        = new System.Windows.Forms.MenuItem();
     this.toolTip1         = new System.Windows.Forms.ToolTip(this.components);
     this.label2           = new System.Windows.Forms.Label();
     this.label1           = new System.Windows.Forms.Label();
     this.label3           = new System.Windows.Forms.Label();
     this.label_count      = new System.Windows.Forms.Label();
     this.label_time       = new System.Windows.Forms.Label();
     this.timer1           = new System.Windows.Forms.Timer(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_setup)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_dial)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_hup)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_set)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_about)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_help)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_exit)).BeginInit();
     this.SuspendLayout();
     //
     // richTextBox1
     //
     this.richTextBox1.BackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(225)))), ((int)(((byte)(248)))));
     this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.richTextBox1.ForeColor   = System.Drawing.Color.Silver;
     this.richTextBox1.Location    = new System.Drawing.Point(281, 229);
     this.richTextBox1.Name        = "richTextBox1";
     this.richTextBox1.ReadOnly    = true;
     this.richTextBox1.Size        = new System.Drawing.Size(677, 394);
     this.richTextBox1.TabIndex    = 0;
     this.richTextBox1.Text        = "";
     //
     // pictureBox1
     //
     this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
     this.pictureBox1.Image     = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
     this.pictureBox1.Location  = new System.Drawing.Point(830, 34);
     this.pictureBox1.Name      = "pictureBox1";
     this.pictureBox1.Size      = new System.Drawing.Size(32, 32);
     this.pictureBox1.SizeMode  = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.pictureBox1.TabIndex  = 1;
     this.pictureBox1.TabStop   = false;
     this.toolTip1.SetToolTip(this.pictureBox1, "关闭");
     this.pictureBox1.Click      += new System.EventHandler(this.pictureBox1_Click);
     this.pictureBox1.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
     this.pictureBox1.MouseEnter += new System.EventHandler(this.pictureBox1_MouseEnter);
     this.pictureBox1.MouseLeave += new System.EventHandler(this.pictureBox1_MouseLeave);
     //
     // pictureBox2
     //
     this.pictureBox2.BackColor = System.Drawing.Color.Transparent;
     this.pictureBox2.Image     = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
     this.pictureBox2.Location  = new System.Drawing.Point(770, 34);
     this.pictureBox2.Name      = "pictureBox2";
     this.pictureBox2.Size      = new System.Drawing.Size(32, 32);
     this.pictureBox2.SizeMode  = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.pictureBox2.TabIndex  = 2;
     this.pictureBox2.TabStop   = false;
     this.toolTip1.SetToolTip(this.pictureBox2, "最小化");
     this.pictureBox2.Click      += new System.EventHandler(this.pictureBox2_Click);
     this.pictureBox2.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox2_MouseDown);
     this.pictureBox2.MouseEnter += new System.EventHandler(this.pictureBox2_MouseEnter);
     this.pictureBox2.MouseLeave += new System.EventHandler(this.pictureBox2_MouseLeave);
     //
     // pictureBox_setup
     //
     this.pictureBox_setup.BackColor   = System.Drawing.Color.Transparent;
     this.pictureBox_setup.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox_setup.Image")));
     this.pictureBox_setup.Location    = new System.Drawing.Point(77, 113);
     this.pictureBox_setup.Name        = "pictureBox_setup";
     this.pictureBox_setup.Size        = new System.Drawing.Size(110, 38);
     this.pictureBox_setup.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox_setup.TabIndex    = 3;
     this.pictureBox_setup.TabStop     = false;
     this.pictureBox_setup.Click      += new System.EventHandler(this.pictureBox_setup_Click);
     this.pictureBox_setup.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox_setup_MouseDown);
     this.pictureBox_setup.MouseEnter += new System.EventHandler(this.pictureBox_setup_MouseEnter);
     this.pictureBox_setup.MouseLeave += new System.EventHandler(this.pictureBox_setup_MouseLeave);
     this.pictureBox_setup.MouseUp    += new System.Windows.Forms.MouseEventHandler(this.pictureBox_setup_MouseUp);
     //
     // pictureBox_dial
     //
     this.pictureBox_dial.BackColor   = System.Drawing.Color.Transparent;
     this.pictureBox_dial.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox_dial.Image")));
     this.pictureBox_dial.Location    = new System.Drawing.Point(77, 157);
     this.pictureBox_dial.Name        = "pictureBox_dial";
     this.pictureBox_dial.Size        = new System.Drawing.Size(110, 38);
     this.pictureBox_dial.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox_dial.TabIndex    = 4;
     this.pictureBox_dial.TabStop     = false;
     this.pictureBox_dial.Click      += new System.EventHandler(this.pictureBox_dial_Click);
     this.pictureBox_dial.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox_dial_MouseDown);
     this.pictureBox_dial.MouseEnter += new System.EventHandler(this.pictureBox_dial_MouseEnter);
     this.pictureBox_dial.MouseLeave += new System.EventHandler(this.pictureBox_dial_MouseLeave);
     this.pictureBox_dial.MouseUp    += new System.Windows.Forms.MouseEventHandler(this.pictureBox_dial_MouseUp);
     //
     // pictureBox_hup
     //
     this.pictureBox_hup.BackColor   = System.Drawing.Color.Transparent;
     this.pictureBox_hup.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox_hup.Image")));
     this.pictureBox_hup.Location    = new System.Drawing.Point(77, 201);
     this.pictureBox_hup.Name        = "pictureBox_hup";
     this.pictureBox_hup.Size        = new System.Drawing.Size(110, 38);
     this.pictureBox_hup.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox_hup.TabIndex    = 5;
     this.pictureBox_hup.TabStop     = false;
     this.pictureBox_hup.Click      += new System.EventHandler(this.pictureBox_hup_Click);
     this.pictureBox_hup.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox_hup_MouseDown);
     this.pictureBox_hup.MouseEnter += new System.EventHandler(this.pictureBox_hup_MouseEnter);
     this.pictureBox_hup.MouseLeave += new System.EventHandler(this.pictureBox_hup_MouseLeave);
     this.pictureBox_hup.MouseUp    += new System.Windows.Forms.MouseEventHandler(this.pictureBox_hup_MouseUp);
     //
     // pictureBox_set
     //
     this.pictureBox_set.BackColor   = System.Drawing.Color.Transparent;
     this.pictureBox_set.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox_set.Image")));
     this.pictureBox_set.Location    = new System.Drawing.Point(77, 245);
     this.pictureBox_set.Name        = "pictureBox_set";
     this.pictureBox_set.Size        = new System.Drawing.Size(110, 38);
     this.pictureBox_set.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox_set.TabIndex    = 6;
     this.pictureBox_set.TabStop     = false;
     this.pictureBox_set.Click      += new System.EventHandler(this.pictureBox_set_Click);
     this.pictureBox_set.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox_set_MouseDown);
     this.pictureBox_set.MouseEnter += new System.EventHandler(this.pictureBox_set_MouseEnter);
     this.pictureBox_set.MouseLeave += new System.EventHandler(this.pictureBox_set_MouseLeave);
     this.pictureBox_set.MouseUp    += new System.Windows.Forms.MouseEventHandler(this.pictureBox_set_MouseUp);
     //
     // pictureBox_about
     //
     this.pictureBox_about.BackColor   = System.Drawing.Color.Transparent;
     this.pictureBox_about.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox_about.Image")));
     this.pictureBox_about.Location    = new System.Drawing.Point(77, 357);
     this.pictureBox_about.Name        = "pictureBox_about";
     this.pictureBox_about.Size        = new System.Drawing.Size(110, 38);
     this.pictureBox_about.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox_about.TabIndex    = 7;
     this.pictureBox_about.TabStop     = false;
     this.pictureBox_about.Click      += new System.EventHandler(this.pictureBox_about_Click);
     this.pictureBox_about.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox_about_MouseDown);
     this.pictureBox_about.MouseEnter += new System.EventHandler(this.pictureBox_about_MouseEnter);
     this.pictureBox_about.MouseLeave += new System.EventHandler(this.pictureBox_about_MouseLeave);
     this.pictureBox_about.MouseUp    += new System.Windows.Forms.MouseEventHandler(this.pictureBox_about_MouseUp);
     //
     // pictureBox_help
     //
     this.pictureBox_help.BackColor   = System.Drawing.Color.Transparent;
     this.pictureBox_help.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox_help.Image")));
     this.pictureBox_help.Location    = new System.Drawing.Point(77, 303);
     this.pictureBox_help.Name        = "pictureBox_help";
     this.pictureBox_help.Size        = new System.Drawing.Size(110, 38);
     this.pictureBox_help.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox_help.TabIndex    = 8;
     this.pictureBox_help.TabStop     = false;
     this.pictureBox_help.Click      += new System.EventHandler(this.pictureBox_help_Click);
     this.pictureBox_help.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox_help_MouseDown);
     this.pictureBox_help.MouseEnter += new System.EventHandler(this.pictureBox_help_MouseEnter);
     this.pictureBox_help.MouseLeave += new System.EventHandler(this.pictureBox_help_MouseLeave);
     this.pictureBox_help.MouseUp    += new System.Windows.Forms.MouseEventHandler(this.pictureBox_help_MouseUp);
     //
     // pictureBox_exit
     //
     this.pictureBox_exit.BackColor   = System.Drawing.Color.Transparent;
     this.pictureBox_exit.Image       = ((System.Drawing.Image)(resources.GetObject("pictureBox_exit.Image")));
     this.pictureBox_exit.Location    = new System.Drawing.Point(77, 413);
     this.pictureBox_exit.Name        = "pictureBox_exit";
     this.pictureBox_exit.Size        = new System.Drawing.Size(110, 38);
     this.pictureBox_exit.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox_exit.TabIndex    = 9;
     this.pictureBox_exit.TabStop     = false;
     this.pictureBox_exit.Click      += new System.EventHandler(this.pictureBox_exit_Click);
     this.pictureBox_exit.MouseDown  += new System.Windows.Forms.MouseEventHandler(this.pictureBox_exit_MouseDown);
     this.pictureBox_exit.MouseEnter += new System.EventHandler(this.pictureBox_exit_MouseEnter);
     this.pictureBox_exit.MouseLeave += new System.EventHandler(this.pictureBox_exit_MouseLeave);
     this.pictureBox_exit.MouseUp    += new System.Windows.Forms.MouseEventHandler(this.pictureBox_exit_MouseUp);
     //
     // contextMenu1
     //
     this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem5,
         this.menuItem4,
         this.menuItem2,
         this.menuItem1,
         this.menuItem6,
         this.menuItem7,
         this.menuItem3
     });
     //
     // menuItem5
     //
     this.menuItem5.Index  = 0;
     this.menuItem5.Text   = "显示主窗口";
     this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
     //
     // menuItem4
     //
     this.menuItem4.Index  = 1;
     this.menuItem4.Text   = "参数设置";
     this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
     //
     // menuItem2
     //
     this.menuItem2.Index  = 2;
     this.menuItem2.Text   = "帮助";
     this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
     //
     // menuItem1
     //
     this.menuItem1.Index  = 3;
     this.menuItem1.Text   = "关于";
     this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
     //
     // menuItem6
     //
     this.menuItem6.Index  = 4;
     this.menuItem6.Text   = "拨号";
     this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
     //
     // menuItem7
     //
     this.menuItem7.Index  = 5;
     this.menuItem7.Text   = "挂断";
     this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
     //
     // menuItem3
     //
     this.menuItem3.Index  = 6;
     this.menuItem3.Text   = "退出";
     this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
     //
     // toolTip1
     //
     this.toolTip1.AutoPopDelay = 5000;
     this.toolTip1.ForeColor    = System.Drawing.Color.ForestGreen;
     this.toolTip1.InitialDelay = 300;
     this.toolTip1.IsBalloon    = true;
     this.toolTip1.ReshowDelay  = 100;
     //
     // label2
     //
     this.label2.BackColor = System.Drawing.Color.Transparent;
     this.label2.Location  = new System.Drawing.Point(459, 165);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(151, 15);
     this.label2.TabIndex  = 11;
     this.label2.Tag       = "";
     this.label2.Text      = "流量:未开始统计";
     this.toolTip1.SetToolTip(this.label2, "流量统计,双击开始统计(不建议打开此功能)");
     this.label2.Click       += new System.EventHandler(this.label2_Click);
     this.label2.DoubleClick += new System.EventHandler(this.label2_DoubleClick);
     //
     // label1
     //
     this.label1.BackColor = System.Drawing.Color.Transparent;
     this.label1.Location  = new System.Drawing.Point(302, 127);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(150, 12);
     this.label1.TabIndex  = 10;
     this.label1.Text      = "当前连接:空";
     //
     // label3
     //
     this.label3.BackColor = System.Drawing.Color.Transparent;
     this.label3.Location  = new System.Drawing.Point(657, 125);
     this.label3.Name      = "label3";
     this.label3.Size      = new System.Drawing.Size(65, 14);
     this.label3.TabIndex  = 12;
     this.label3.Text      = "状态:断线";
     //
     // label_count
     //
     this.label_count.BackColor = System.Drawing.Color.Transparent;
     this.label_count.Location  = new System.Drawing.Point(302, 165);
     this.label_count.Name      = "label_count";
     this.label_count.Size      = new System.Drawing.Size(139, 17);
     this.label_count.TabIndex  = 13;
     this.label_count.Text      = "重拨次数:0";
     //
     // label_time
     //
     this.label_time.BackColor = System.Drawing.Color.Transparent;
     this.label_time.Location  = new System.Drawing.Point(468, 125);
     this.label_time.Name      = "label_time";
     this.label_time.Size      = new System.Drawing.Size(152, 18);
     this.label_time.TabIndex  = 14;
     this.label_time.Text      = "已运行:0";
     //
     // timer1
     //
     this.timer1.Interval = 1000;
     this.timer1.Tick    += new System.EventHandler(this.timer1_Tick);
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
     this.BackColor         = System.Drawing.SystemColors.Control;
     this.BackgroundImage   = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
     this.ClientSize        = new System.Drawing.Size(984, 656);
     this.Controls.Add(this.label_time);
     this.Controls.Add(this.label_count);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.pictureBox_exit);
     this.Controls.Add(this.pictureBox_help);
     this.Controls.Add(this.pictureBox_about);
     this.Controls.Add(this.pictureBox_set);
     this.Controls.Add(this.pictureBox_hup);
     this.Controls.Add(this.pictureBox_dial);
     this.Controls.Add(this.pictureBox_setup);
     this.Controls.Add(this.pictureBox2);
     this.Controls.Add(this.pictureBox1);
     this.Controls.Add(this.richTextBox1);
     this.Icon          = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name          = "Form1";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "无线精灵2016";
     this.Closing      += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
     this.Load         += new System.EventHandler(this.Form1_Load);
     this.MouseDown    += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseDown);
     this.MouseMove    += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);
     this.MouseUp      += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseUp);
     this.Resize       += new System.EventHandler(this.Form1_Resize);
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_setup)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_dial)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_hup)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_set)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_about)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_help)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox_exit)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#37
0
        public MainForm()
        {
            InitializeComponent();

            if (!string.IsNullOrEmpty(Program.directory))
            {
                this.Text += "-[" + Program.directory + "]";
            }


            config.GetLineCameras();
            Properties.Settings setting = Properties.Settings.Default;

            cpuCounter = new PerformanceCounter();
            ramCounter = new PerformanceCounter("Memory", "Available MBytes");

            cpuCounter.CategoryName = "Processor";
            cpuCounter.CounterName  = "% Processor Time";
            cpuCounter.InstanceName = "_Total";

            //Camera[] cams = new Camera[Configuration.Instance.Cameras.Count];
            //Configuration.Instance.Cameras.CopyTo(cams, 0);
            //this.Cameras = cams;

            time          = new System.Windows.Forms.Timer();
            time.Tick    += time_Elapsed;
            time.Interval = 3000;
            time.Enabled  = true;

            //FileHandle fh = new FileHandle();//删除无效视频
            //fh.DeleteInvalidVideo();

            //StartSetCam(setting);//根据光亮值设置相机

            SetMonitor();                                                                 //启动布控
            MotionDetect.MotionDetect.SetRectThr(setting.Thresholding, setting.ImageArr); //调用分组设置值

            InitStatusBar();

            MotionDetect.MotionDetect.SetDrawRect(setting.DrawMotionRect);

            float left   = float.Parse(setting.IconLeftExtRatio);
            float top    = float.Parse(setting.IconTopExtRatio);
            float right  = float.Parse(setting.IconRightExtRatio);
            float bottom = float.Parse(setting.IconBottomExtRatio);

            int minFaceWidth = int.Parse(setting.MinFaceWidth);
            int maxFaceWidth = int.Parse(setting.MaxFaceWidth);

            float ratio = (float)maxFaceWidth / minFaceWidth;

            SetupExtractor(setting.EnvMode,
                           left,
                           right,
                           top,
                           bottom,
                           minFaceWidth,
                           ratio,
                           new Rectangle(int.Parse(setting.SrchRegionLeft),
                                         int.Parse(setting.SrchRegionTop),
                                         int.Parse(setting.SrchRegionWidth),
                                         int.Parse(setting.SrchRegionHeight))
                           );
        }
示例#38
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            this.initializeVisible();
            this.buttonStart.Visible = false;
            Random random = new Random();
            int    a, b, c;

            quick = 3600;

            timeGame          = new System.Windows.Forms.Timer();
            timeGame.Interval = 1;

            timeGame.Tick   += new EventHandler(timeGame_Tick);
            timeGame.Enabled = true;

            this.a            = random.Next(1, 10);
            this.b            = random.Next(1, 30);
            this.labelQ1.Text = "Q1)  2 * " + this.a + " + 3 * (2 - " + this.b + ") = ?";
            this.q1           = 2 * this.a + 3 * (2 - this.b);

            this.a            = random.Next(1, 12);
            this.b            = random.Next(1, 10);
            this.labelQ2.Text = "Q2)  2 * " + this.a + " + 0 * (" + this.b + " + " + this.a + ") = ?";
            this.q2           = 2 * this.a + 0 * (this.b + this.a);

            this.a            = random.Next(1, 5);
            this.b            = random.Next(1, 5);
            this.c            = random.Next(1, 5);
            this.labelQ3.Text = "Q3) " + this.a + " + " + this.b + " - " + this.c + " = ?";
            this.q3           = this.a + this.b - this.c;

            this.a            = random.Next(1, 5);
            this.b            = random.Next(1, 20);
            this.labelQ4.Text = "Q4)  (" + this.a + " + " + this.b + ") * 2 = ?";
            this.q4           = (this.a + this.b) * 2;

            this.a            = random.Next(1, 5);
            this.b            = random.Next(1, 30);
            this.c            = random.Next(1, 5);
            this.labelQ5.Text = "Q5)  4 * " + this.a + " + 2 * " + this.b + " + " + this.c + " = ?";
            this.q5           = 4 * this.a + 2 * this.b + this.c;

            this.a            = random.Next(1, 100);
            this.b            = random.Next(1, 300);
            this.labelQ6.Text = "Q6)  " + this.a + " + " + this.b + " = ?";
            this.q6           = this.a + this.c;

            this.a            = random.Next(1, 5);
            this.b            = random.Next(1, 5);
            this.c            = random.Next(1, 30);
            this.labelQ7.Text = "Q7)  " + this.a + " - " + this.b + " - " + this.c + " = ?";
            this.q7           = this.a - this.b - this.c;


            this.a            = random.Next(1, 10);
            this.b            = random.Next(1, 10);
            this.c            = random.Next(1, 8);
            this.labelQ8.Text = "Q8)  (" + this.a + " + " + this.b + ") - " + this.c + " = ?";
            this.q8           = (this.a + this.b) - this.c;

            this.a            = random.Next(1, 20);
            this.b            = random.Next(1, 20);
            this.c            = random.Next(1, 8);
            this.labelQ9.Text = "Q9)  1 - " + this.a + " + " + this.b + " * " + this.c + " = ?";
            this.q9           = 1 - this.a + this.c + this.c;

            this.a             = random.Next(1, 200);
            this.b             = random.Next(1, 20);
            this.c             = random.Next(1, 100);
            this.labelQ10.Text = "Q10)  (" + this.a + " - " + this.b + " + 0 * " + this.c + ") * 1 = ?";
            this.q10           = (this.a - this.b + 0 * this.c) * 1;
        }
示例#39
0
文件: MainForm.cs 项目: mrhehe420/g
        public MainForm(Settings settings)
        {
            InitializeComponent();

            appRestartPendingLabel.Visible           = false;
            progress_toolstrip_progressbar.Visible   = false;
            aboutToolStripMenuItem.DropDownDirection = ToolStripDropDownDirection.BelowLeft;

            // Settings
            SteamAPIWrapper.Init();
            Settings = settings;

            // Restore states
            showHiddenModsToolStripMenuItem.Checked = settings.ShowHiddenElements;
            cShowStateFilter.Checked       = settings.ShowStateFilter;
            cEnableGrouping.Checked        = settings.ShowModListGroups;
            cShowPrimaryDuplicates.Checked = Settings.ShowPrimaryDuplicateAsDependency;
            cShowPrimaryDuplicates.Visible = Settings.EnableDuplicateModIdWorkaround;
            modlist_ListObjectListView.UseTranslucentSelection = Settings.UseTranslucentModListSelection;
            olvRequiredMods.UseTranslucentSelection            = Settings.UseTranslucentModListSelection;
            olvDependentMods.UseTranslucentSelection           = Settings.UseTranslucentModListSelection;

            // Set visibility of some controls depending on game type
            var wotcAvailable = Directory.Exists(settings.GamePath + @"\XCom2-WarOfTheChosen");

            runXCOM2ToolStripMenuItem.Visible               = Program.XEnv.Game == GameId.X2;
            runWarOfTheChosenToolStripMenuItem.Visible      = wotcAvailable && Program.XEnv.Game == GameId.X2;
            runChallengeModeToolStripMenuItem.Visible       = wotcAvailable && Program.XEnv.Game == GameId.X2;
            importFromWotCToolStripMenuItem.Visible         = wotcAvailable && Program.XEnv.Game == GameId.X2;
            importFromXCOM2ToolStripMenuItem.Visible        = Program.XEnv.Game == GameId.X2;
            runChimeraSquadToolStripMenuItem.Visible        = Program.XEnv.Game == GameId.ChimeraSquad;
            importFromChimeraSquadToolStripMenuItem.Visible = Program.XEnv.Game == GameId.ChimeraSquad;

            if (Program.XEnv.Game != GameId.X2)
            {
                modlist_ListObjectListView.AllColumns.Remove(olvForWOTC);
                modlist_ListObjectListView.RebuildColumns();
                olvDependentMods.AllColumns.Remove(olvColDepModsWotc);
                olvDependentMods.RebuildColumns();
                olvRequiredMods.AllColumns.Remove(olvColReqModsWotc);
                olvRequiredMods.RebuildColumns();
            }

            // If game path is not configured, hide several function/options.
            if (string.IsNullOrEmpty(settings.GamePath))
            {
                runWarOfTheChosenToolStripMenuItem.Enabled      = false;
                runChallengeModeToolStripMenuItem.Enabled       = false;
                importFromWotCToolStripMenuItem.Enabled         = false;
                importFromXCOM2ToolStripMenuItem.Enabled        = false;
                importFromChimeraSquadToolStripMenuItem.Enabled = false;
            }

            // Init interface
            InitModListView();
            InitDependencyListViews();
            UpdateInterface();
            RegisterEvents();

            // Other intialization
            InitializeTabImages();

            // Init the argument checkboxes
            InitQuickArgumentsMenu(settings);

#if !DEBUG
            // Update mod information
            var mods = Settings.Mods.All.ToList();

            UpdateMods(mods, () =>
            {
                modlist_ListObjectListView.RefreshObjects(mods);
            });
#endif
            // Run callbacks
            var t1 = new Timer();
            t1.Tick    += (sender, e) => { SteamAPIWrapper.RunCallbacks(); };
            t1.Interval = 10;
            t1.Start();

/*
 *          // Check for running downloads
 #if DEBUG
 *          if (Settings.GetWorkshopPath() != null)
 *          {
 *              CheckSteamForNewMods();
 *
 *              var t2 = new Timer();
 *              t2.Tick += (sender, e) => { CheckSteamForNewMods(); };
 *              t2.Interval = 30000;
 *              t2.Start();
 *          }
 #endif
 */
        }
示例#40
0
        public static void StartSerial(enCardType cardType)
        {
            //bool bolIsUse = false;//是否启用读卡器或者写卡器
            try
            {
                DataTable dtDesc = ExecuteSQL.CallView(140, "", "MachineName='" + LoginInfo.MachineName + "'", "");
                if (dtDesc.Rows.Count > 0)
                {
                    if (cardType == enCardType.ReadCard)
                    {
                        _Com          = dtDesc.Rows[0]["ReadCardSerialCOM"].ToString().TrimEnd();
                        IsUseReadCard = LBConverter.ToBoolean(dtDesc.Rows[0]["UseReadCard"]);
                        _IsUseNet     = LBConverter.ToInt32(dtDesc.Rows[0]["ConnectType"].ToString().TrimEnd()) == 1 ? true : false;
                        _NetIPAddress = dtDesc.Rows[0]["IPAddress"].ToString().TrimEnd();
                        _NetPort      = LBConverter.ToInt32(dtDesc.Rows[0]["IPPort"].ToString().TrimEnd());
                    }
                    else
                    {
                        _Com          = dtDesc.Rows[0]["WriteCardSerialCOM"].ToString().TrimEnd();
                        IsUseReadCard = LBConverter.ToBoolean(dtDesc.Rows[0]["UseWriteCard"]);
                    }
                    powerDbm = LBConverter.ToByte(dtDesc.Rows[0]["ReadCardBaud"]);
                }

                //if (mTimer == null)
                //{
                //    mTimer = new System.Windows.Forms.Timer();
                //    mTimer.Interval = 500;
                //    mTimer.Tick += MTimer_Tick;
                //    mTimer.Enabled = true;
                //}

                if (mTimerVerify == null)
                {
                    mTimerVerify          = new System.Windows.Forms.Timer();
                    mTimerVerify.Interval = 2000;
                    mTimerVerify.Tick    += mTimerVerify_Tick;
                    mTimerVerify.Enabled  = true;
                }
            }
            catch (Exception ex)
            {
                LBErrorLog.InsertFileLog("StartSerial:" + ex.Message);
            }

            try
            {
                if (COMIsOpen)
                {
                    ClosePort();
                }
                if (IsUseReadCard && !COMIsOpen)
                {
                    COMIsOpen = OpenPort();
                }

                //if (IsUseReadCard)
                //{
                //    if (mThread == null)
                //    {
                //        mThread = new Thread(ReadCardAction);
                //        mThread.Start();
                //    }
                //}
            }
            catch (Exception ex)
            {
            }
        }
示例#41
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.mainMenu        = new System.Windows.Forms.MainMenu();
     this.menuItem1       = new System.Windows.Forms.MenuItem();
     this.gravLabel       = new System.Windows.Forms.Label();
     this.secondPanel     = new System.Windows.Forms.Panel();
     this.btnReset        = new System.Windows.Forms.Button();
     this.label6          = new System.Windows.Forms.Label();
     this.label5          = new System.Windows.Forms.Label();
     this.avgLabel        = new System.Windows.Forms.Label();
     this.avgContextMenu1 = new System.Windows.Forms.ContextMenu();
     this.menuItem2       = new System.Windows.Forms.MenuItem();
     this.yMax            = new System.Windows.Forms.TextBox();
     this.yMin            = new System.Windows.Forms.TextBox();
     this.gravPictureBox  = new System.Windows.Forms.PictureBox();
     this.msgFileexists   = new System.Windows.Forms.Panel();
     this.label7          = new System.Windows.Forms.Label();
     this.btnCancel       = new System.Windows.Forms.Button();
     this.btnAppend       = new System.Windows.Forms.Button();
     this.btnOverwrite    = new System.Windows.Forms.Button();
     this.textBox2        = new System.Windows.Forms.TextBox();
     this.firstPanel      = new System.Windows.Forms.Panel();
     this.txtLogFile      = new System.Windows.Forms.TextBox();
     this.label4          = new System.Windows.Forms.Label();
     this.label3          = new System.Windows.Forms.Label();
     this.textBox1        = new System.Windows.Forms.TextBox();
     this.panel1          = new System.Windows.Forms.Panel();
     this.radClosed       = new System.Windows.Forms.RadioButton();
     this.label2          = new System.Windows.Forms.Label();
     this.radOpen         = new System.Windows.Forms.RadioButton();
     this.panel2          = new System.Windows.Forms.Panel();
     this.radLogOn        = new System.Windows.Forms.RadioButton();
     this.radLogOff       = new System.Windows.Forms.RadioButton();
     this.label1          = new System.Windows.Forms.Label();
     this.timer1          = new System.Windows.Forms.Timer();
     this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
     this.notification1   = new Microsoft.WindowsCE.Forms.Notification();
     this.secondPanel.SuspendLayout();
     this.msgFileexists.SuspendLayout();
     this.firstPanel.SuspendLayout();
     this.panel1.SuspendLayout();
     this.panel2.SuspendLayout();
     this.SuspendLayout();
     //
     // mainMenu
     //
     this.mainMenu.MenuItems.Add(this.menuItem1);
     //
     // menuItem1
     //
     this.menuItem1.Text   = "Plot";
     this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
     //
     // gravLabel
     //
     this.gravLabel.Font     = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Bold);
     this.gravLabel.Location = new System.Drawing.Point(97, 140);
     this.gravLabel.Name     = "gravLabel";
     this.gravLabel.Size     = new System.Drawing.Size(108, 24);
     this.gravLabel.Text     = "<Gravity>";
     //
     // secondPanel
     //
     this.secondPanel.Controls.Add(this.btnReset);
     this.secondPanel.Controls.Add(this.label6);
     this.secondPanel.Controls.Add(this.label5);
     this.secondPanel.Controls.Add(this.avgLabel);
     this.secondPanel.Controls.Add(this.gravLabel);
     this.secondPanel.Controls.Add(this.yMax);
     this.secondPanel.Controls.Add(this.yMin);
     this.secondPanel.Controls.Add(this.gravPictureBox);
     this.secondPanel.Location = new System.Drawing.Point(248, 0);
     this.secondPanel.Name     = "secondPanel";
     this.secondPanel.Size     = new System.Drawing.Size(240, 269);
     this.secondPanel.Visible  = false;
     //
     // btnReset
     //
     this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                   | System.Windows.Forms.AnchorStyles.Left)
                                                                  | System.Windows.Forms.AnchorStyles.Right)));
     this.btnReset.Location = new System.Drawing.Point(197, 176);
     this.btnReset.Name     = "btnReset";
     this.btnReset.Size     = new System.Drawing.Size(40, 20);
     this.btnReset.TabIndex = 5;
     this.btnReset.Text     = " rst";
     this.btnReset.Click   += new System.EventHandler(this.btnReset_Click);
     //
     // label6
     //
     this.label6.Font     = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Bold);
     this.label6.Location = new System.Drawing.Point(-2, 173);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(93, 33);
     this.label6.Text     = "Average";
     //
     // label5
     //
     this.label5.Font     = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Bold);
     this.label5.Location = new System.Drawing.Point(-2, 140);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(93, 30);
     this.label5.Text     = "Current";
     //
     // avgLabel
     //
     this.avgLabel.ContextMenu = this.avgContextMenu1;
     this.avgLabel.Font        = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Bold);
     this.avgLabel.Location    = new System.Drawing.Point(97, 173);
     this.avgLabel.Name        = "avgLabel";
     this.avgLabel.Size        = new System.Drawing.Size(108, 24);
     this.avgLabel.Text        = "<Avg>";
     //
     // avgContextMenu1
     //
     this.avgContextMenu1.MenuItems.Add(this.menuItem2);
     //
     // menuItem2
     //
     this.menuItem2.Text   = "Copy";
     this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
     //
     // yMax
     //
     this.yMax.Font         = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
     this.yMax.Location     = new System.Drawing.Point(5, 9);
     this.yMax.Name         = "yMax";
     this.yMax.Size         = new System.Drawing.Size(24, 25);
     this.yMax.TabIndex     = 10;
     this.yMax.Text         = "2";
     this.yMax.TextChanged += new System.EventHandler(this.yMax_TextChanged);
     //
     // yMin
     //
     this.yMin.Font         = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
     this.yMin.Location     = new System.Drawing.Point(6, 117);
     this.yMin.Name         = "yMin";
     this.yMin.Size         = new System.Drawing.Size(24, 25);
     this.yMin.TabIndex     = 11;
     this.yMin.Text         = "1";
     this.yMin.TextChanged += new System.EventHandler(this.yMin_TextChanged);
     //
     // gravPictureBox
     //
     this.gravPictureBox.Location = new System.Drawing.Point(3, 3);
     this.gravPictureBox.Name     = "gravPictureBox";
     this.gravPictureBox.Size     = new System.Drawing.Size(237, 134);
     //
     // msgFileexists
     //
     this.msgFileexists.Controls.Add(this.label7);
     this.msgFileexists.Controls.Add(this.btnCancel);
     this.msgFileexists.Controls.Add(this.btnAppend);
     this.msgFileexists.Controls.Add(this.btnOverwrite);
     this.msgFileexists.Controls.Add(this.textBox2);
     this.msgFileexists.Location = new System.Drawing.Point(7, 156);
     this.msgFileexists.Name     = "msgFileexists";
     this.msgFileexists.Size     = new System.Drawing.Size(230, 91);
     this.msgFileexists.Visible  = false;
     //
     // label7
     //
     this.label7.Location = new System.Drawing.Point(10, 14);
     this.label7.Name     = "label7";
     this.label7.Size     = new System.Drawing.Size(116, 20);
     this.label7.Text     = "Log file exists.";
     //
     // btnCancel
     //
     this.btnCancel.Font     = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
     this.btnCancel.Location = new System.Drawing.Point(158, 47);
     this.btnCancel.Name     = "btnCancel";
     this.btnCancel.Size     = new System.Drawing.Size(65, 20);
     this.btnCancel.TabIndex = 19;
     this.btnCancel.Text     = "Cancel";
     this.btnCancel.Click   += new System.EventHandler(this.btnCancel_Click);
     //
     // btnAppend
     //
     this.btnAppend.Font     = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
     this.btnAppend.Location = new System.Drawing.Point(10, 47);
     this.btnAppend.Name     = "btnAppend";
     this.btnAppend.Size     = new System.Drawing.Size(65, 20);
     this.btnAppend.TabIndex = 18;
     this.btnAppend.Text     = "Append";
     this.btnAppend.Click   += new System.EventHandler(this.btnAppend_Click);
     //
     // btnOverwrite
     //
     this.btnOverwrite.Font     = new System.Drawing.Font("Tahoma", 7.5F, System.Drawing.FontStyle.Bold);
     this.btnOverwrite.Location = new System.Drawing.Point(81, 47);
     this.btnOverwrite.Name     = "btnOverwrite";
     this.btnOverwrite.Size     = new System.Drawing.Size(71, 20);
     this.btnOverwrite.TabIndex = 17;
     this.btnOverwrite.Text     = "Overwrite";
     this.btnOverwrite.Click   += new System.EventHandler(this.btnOverwrite_Click);
     //
     // textBox2
     //
     this.textBox2.Location  = new System.Drawing.Point(0, 0);
     this.textBox2.Multiline = true;
     this.textBox2.Name      = "textBox2";
     this.textBox2.Size      = new System.Drawing.Size(227, 88);
     this.textBox2.TabIndex  = 20;
     //
     // firstPanel
     //
     this.firstPanel.Controls.Add(this.msgFileexists);
     this.firstPanel.Controls.Add(this.txtLogFile);
     this.firstPanel.Controls.Add(this.label4);
     this.firstPanel.Controls.Add(this.label3);
     this.firstPanel.Controls.Add(this.textBox1);
     this.firstPanel.Controls.Add(this.panel1);
     this.firstPanel.Controls.Add(this.panel2);
     this.firstPanel.Location = new System.Drawing.Point(0, 0);
     this.firstPanel.Name     = "firstPanel";
     this.firstPanel.Size     = new System.Drawing.Size(240, 266);
     //
     // txtLogFile
     //
     this.txtLogFile.Location = new System.Drawing.Point(32, 180);
     this.txtLogFile.Name     = "txtLogFile";
     this.txtLogFile.Size     = new System.Drawing.Size(179, 25);
     this.txtLogFile.TabIndex = 10;
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(20, 157);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(100, 20);
     this.label4.Text     = "Log File";
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(20, 50);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(178, 20);
     this.label3.Text     = "Averaging Interval (sec.)";
     //
     // textBox1
     //
     this.textBox1.Location     = new System.Drawing.Point(32, 78);
     this.textBox1.Name         = "textBox1";
     this.textBox1.Size         = new System.Drawing.Size(100, 25);
     this.textBox1.TabIndex     = 6;
     this.textBox1.Text         = "10";
     this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
     //
     // panel1
     //
     this.panel1.Controls.Add(this.radClosed);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.radOpen);
     this.panel1.Location = new System.Drawing.Point(0, 6);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(237, 47);
     //
     // radClosed
     //
     this.radClosed.Checked         = true;
     this.radClosed.Location        = new System.Drawing.Point(90, 23);
     this.radClosed.Name            = "radClosed";
     this.radClosed.Size            = new System.Drawing.Size(100, 20);
     this.radClosed.TabIndex        = 3;
     this.radClosed.Text            = "Closed";
     this.radClosed.CheckedChanged += new System.EventHandler(this.radClosed_CheckedChanged);
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(20, 0);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(100, 20);
     this.label2.Text     = "Serial Port";
     //
     // radOpen
     //
     this.radOpen.Location        = new System.Drawing.Point(14, 23);
     this.radOpen.Name            = "radOpen";
     this.radOpen.Size            = new System.Drawing.Size(100, 20);
     this.radOpen.TabIndex        = 2;
     this.radOpen.TabStop         = false;
     this.radOpen.Text            = "Open";
     this.radOpen.CheckedChanged += new System.EventHandler(this.radOpen_CheckedChanged);
     //
     // panel2
     //
     this.panel2.Controls.Add(this.radLogOn);
     this.panel2.Controls.Add(this.radLogOff);
     this.panel2.Controls.Add(this.label1);
     this.panel2.Location = new System.Drawing.Point(0, 97);
     this.panel2.Name     = "panel2";
     this.panel2.Size     = new System.Drawing.Size(240, 57);
     //
     // radLogOn
     //
     this.radLogOn.Location        = new System.Drawing.Point(11, 33);
     this.radLogOn.Name            = "radLogOn";
     this.radLogOn.Size            = new System.Drawing.Size(53, 20);
     this.radLogOn.TabIndex        = 18;
     this.radLogOn.TabStop         = false;
     this.radLogOn.Text            = "On";
     this.radLogOn.CheckedChanged += new System.EventHandler(this.radLogOn_CheckedChanged);
     //
     // radLogOff
     //
     this.radLogOff.Checked         = true;
     this.radLogOff.Location        = new System.Drawing.Point(113, 33);
     this.radLogOff.Name            = "radLogOff";
     this.radLogOff.Size            = new System.Drawing.Size(100, 20);
     this.radLogOff.TabIndex        = 19;
     this.radLogOff.Text            = "Off";
     this.radLogOff.CheckedChanged += new System.EventHandler(this.radLogOff_CheckedChanged);
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(20, 10);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(100, 20);
     this.label1.Text     = "Logging";
     //
     // openFileDialog1
     //
     this.openFileDialog1.FileName = "openFileDialog1";
     //
     // notification1
     //
     this.notification1.Text = "notification1";
     //
     // MainForm
     //
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
     this.ClientSize    = new System.Drawing.Size(503, 269);
     this.Controls.Add(this.secondPanel);
     this.Controls.Add(this.firstPanel);
     this.KeyPreview  = true;
     this.Menu        = this.mainMenu;
     this.MinimizeBox = false;
     this.Name        = "MainForm";
     this.Text        = "USGS Gravity";
     this.Load       += new System.EventHandler(this.MainForm_Load);
     this.secondPanel.ResumeLayout(false);
     this.msgFileexists.ResumeLayout(false);
     this.firstPanel.ResumeLayout(false);
     this.panel1.ResumeLayout(false);
     this.panel2.ResumeLayout(false);
     this.ResumeLayout(false);
 }
示例#42
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components  = new System.ComponentModel.Container();
     this.UpdateTimer = new System.Windows.Forms.Timer(this.components);
     this.TSSLlInfoPN = new System.Windows.Forms.ToolStripStatusLabel();
     this.TSSLConn    = new System.Windows.Forms.ToolStripStatusLabel();
     this.TSSLDidconn = new System.Windows.Forms.ToolStripStatusLabel();
     this.TSSLStatePN = new System.Windows.Forms.ToolStripStatusLabel();
     this.TSSLTimePN  = new System.Windows.Forms.ToolStripStatusLabel();
     this.SuspendLayout();
     //
     // UpdateTimer
     //
     this.UpdateTimer.Interval = 30000;
     this.UpdateTimer.Tick    += new System.EventHandler(this.UpdateTimer_Tick);
     //
     // TSSLlInfoPN
     //
     this.TSSLlInfoPN.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.TSSLlInfoPN.ImageAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     this.TSSLlInfoPN.Name         = "TSSLlInfoPN";
     this.TSSLlInfoPN.Size         = new System.Drawing.Size(0, 0);
     this.TSSLlInfoPN.TextAlign    = System.Drawing.ContentAlignment.MiddleLeft;
     this.TSSLlInfoPN.ToolTipText  = "Vendor Info";
     //
     // TSSLConn
     //
     this.TSSLConn.BackColor    = System.Drawing.SystemColors.Control;
     this.TSSLConn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.TSSLConn.Image        = global::CAS.Lib.OPCClientControlsLib.ImagesResources.serwer_opc_connect_48;
     this.TSSLConn.Margin       = new System.Windows.Forms.Padding(2);
     this.TSSLConn.Name         = "TSSLConn";
     this.TSSLConn.Size         = new System.Drawing.Size(16, 16);
     this.TSSLConn.Text         = "Server Connected";
     this.TSSLConn.ToolTipText  = "Server Connected";
     this.TSSLConn.Visible      = false;
     //
     // TSSLDidconn
     //
     this.TSSLDidconn.BackColor    = System.Drawing.SystemColors.Control;
     this.TSSLDidconn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.TSSLDidconn.Image        = global::CAS.Lib.OPCClientControlsLib.ImagesResources.serwer_opc_disconnect_48;
     this.TSSLDidconn.Margin       = new System.Windows.Forms.Padding(2);
     this.TSSLDidconn.Name         = "TSSLDidconn";
     this.TSSLDidconn.Size         = new System.Drawing.Size(16, 16);
     this.TSSLDidconn.Text         = "Server Disconnected";
     this.TSSLDidconn.ToolTipText  = "Server Disconnected";
     //
     // TSSLStatePN
     //
     this.TSSLStatePN.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.TSSLStatePN.ImageAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     this.TSSLStatePN.Name         = "TSSLStatePN";
     this.TSSLStatePN.Size         = new System.Drawing.Size(0, 0);
     this.TSSLStatePN.TextAlign    = System.Drawing.ContentAlignment.MiddleLeft;
     this.TSSLStatePN.ToolTipText  = "Server State";
     //
     // TSSLTimePN
     //
     this.TSSLTimePN.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.TSSLTimePN.Name         = "TSSLTimePN";
     this.TSSLTimePN.Size         = new System.Drawing.Size(0, 0);
     this.TSSLTimePN.TextAlign    = System.Drawing.ContentAlignment.MiddleLeft;
     this.TSSLTimePN.ToolTipText  = "Current Time";
     //
     // ServerStatusStrip
     //
     this.Dock      = System.Windows.Forms.DockStyle.None;
     this.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
     this.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.TSSLConn,
         this.TSSLDidconn,
         this.TSSLlInfoPN,
         this.TSSLStatePN,
         this.TSSLTimePN
     });
     this.LayoutStyle      = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
     this.RenderMode       = System.Windows.Forms.ToolStripRenderMode.Professional;
     this.ShowItemToolTips = true;
     this.Size             = new System.Drawing.Size(40, 30);
     this.Stretch          = false;
     this.Text             = "Server Status";
     this.ResumeLayout(false);
 }
示例#43
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Splash));
     this.lblStatus        = new System.Windows.Forms.LabelTS();
     this.lblTimeRemaining = new System.Windows.Forms.LabelTS();
     this.pnlStatus        = new System.Windows.Forms.Panel();
     this.timer1           = new System.Windows.Forms.Timer(this.components);
     this.SuspendLayout();
     //
     // lblStatus
     //
     this.lblStatus.BackColor = System.Drawing.Color.Transparent;
     this.lblStatus.ForeColor = System.Drawing.Color.White;
     this.lblStatus.Location  = new System.Drawing.Point(0, 230);
     this.lblStatus.Name      = "lblStatus";
     this.lblStatus.Size      = new System.Drawing.Size(400, 16);
     this.lblStatus.TabIndex  = 0;
     this.lblStatus.Text      = "Status";
     this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblTimeRemaining
     //
     this.lblTimeRemaining.BackColor = System.Drawing.Color.Transparent;
     this.lblTimeRemaining.ForeColor = System.Drawing.Color.White;
     this.lblTimeRemaining.Location  = new System.Drawing.Point(296, 232);
     this.lblTimeRemaining.Name      = "lblTimeRemaining";
     this.lblTimeRemaining.Size      = new System.Drawing.Size(100, 16);
     this.lblTimeRemaining.TabIndex  = 1;
     this.lblTimeRemaining.Text      = "Time";
     //
     // pnlStatus
     //
     this.pnlStatus.BackColor = System.Drawing.Color.Transparent;
     this.pnlStatus.Location  = new System.Drawing.Point(50, 190);
     this.pnlStatus.Name      = "pnlStatus";
     this.pnlStatus.Size      = new System.Drawing.Size(300, 24);
     this.pnlStatus.TabIndex  = 2;
     this.pnlStatus.Paint    += new System.Windows.Forms.PaintEventHandler(this.pnlStatus_Paint);
     //
     // timer1
     //
     this.timer1.Enabled = true;
     this.timer1.Tick   += new System.EventHandler(this.timer1_Tick);
     //
     // Splash
     //
     this.AutoScale         = false;
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackgroundImage   = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
     this.ClientSize        = new System.Drawing.Size(400, 250);
     this.Controls.Add(this.pnlStatus);
     this.Controls.Add(this.lblTimeRemaining);
     this.Controls.Add(this.lblStatus);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name            = "Splash";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text            = "Splash";
     this.ResumeLayout(false);
 }
示例#44
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(GeoEvents));
     this.cmdFullExtent     = new System.Windows.Forms.Button();
     this.chkTracking       = new System.Windows.Forms.CheckBox();
     this.Label1            = new System.Windows.Forms.Label();
     this.timer1            = new System.Windows.Forms.Timer(this.components);
     this.axMapControl1     = new ESRI.ArcGIS.Controls.AxMapControl();
     this.axLicenseControl1 = new ESRI.ArcGIS.Controls.AxLicenseControl();
     ((System.ComponentModel.ISupportInitialize)(this.axMapControl1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.axLicenseControl1)).BeginInit();
     this.SuspendLayout();
     //
     // cmdFullExtent
     //
     this.cmdFullExtent.BackColor   = System.Drawing.SystemColors.Control;
     this.cmdFullExtent.Cursor      = System.Windows.Forms.Cursors.Default;
     this.cmdFullExtent.Font        = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.cmdFullExtent.ForeColor   = System.Drawing.SystemColors.ControlText;
     this.cmdFullExtent.Location    = new System.Drawing.Point(560, 416);
     this.cmdFullExtent.Name        = "cmdFullExtent";
     this.cmdFullExtent.RightToLeft = System.Windows.Forms.RightToLeft.No;
     this.cmdFullExtent.Size        = new System.Drawing.Size(121, 25);
     this.cmdFullExtent.TabIndex    = 4;
     this.cmdFullExtent.Text        = "Zoom to Full Extent";
     this.cmdFullExtent.Click      += new System.EventHandler(this.cmdFullExtent_Click);
     //
     // chkTracking
     //
     this.chkTracking.BackColor   = System.Drawing.SystemColors.Control;
     this.chkTracking.Cursor      = System.Windows.Forms.Cursors.Default;
     this.chkTracking.Font        = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.chkTracking.ForeColor   = System.Drawing.SystemColors.ControlText;
     this.chkTracking.Location    = new System.Drawing.Point(16, 424);
     this.chkTracking.Name        = "chkTracking";
     this.chkTracking.RightToLeft = System.Windows.Forms.RightToLeft.No;
     this.chkTracking.Size        = new System.Drawing.Size(137, 17);
     this.chkTracking.TabIndex    = 3;
     this.chkTracking.Text        = "Enable GPS Tracking";
     this.chkTracking.Click      += new System.EventHandler(this.chkTracking_Click);
     //
     // Label1
     //
     this.Label1.BackColor   = System.Drawing.SystemColors.Control;
     this.Label1.Cursor      = System.Windows.Forms.Cursors.Default;
     this.Label1.Font        = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.Label1.ForeColor   = System.Drawing.SystemColors.ControlText;
     this.Label1.Location    = new System.Drawing.Point(152, 416);
     this.Label1.Name        = "Label1";
     this.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No;
     this.Label1.Size        = new System.Drawing.Size(353, 33);
     this.Label1.TabIndex    = 5;
     this.Label1.Text        = "Use the left hand mouse button to zoom in. Use the other mouse buttons to click o" +
                               "n an agent and change the symbology.  ";
     //
     // timer1
     //
     this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
     //
     // axMapControl1
     //
     this.axMapControl1.Location     = new System.Drawing.Point(8, 8);
     this.axMapControl1.Name         = "axMapControl1";
     this.axMapControl1.OcxState     = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMapControl1.OcxState")));
     this.axMapControl1.Size         = new System.Drawing.Size(664, 400);
     this.axMapControl1.TabIndex     = 6;
     this.axMapControl1.OnMouseDown += new ESRI.ArcGIS.Controls.IMapControlEvents2_Ax_OnMouseDownEventHandler(this.axMapControl1_OnMouseDown);
     //
     // axLicenseControl1
     //
     this.axLicenseControl1.Enabled  = true;
     this.axLicenseControl1.Location = new System.Drawing.Point(24, 16);
     this.axLicenseControl1.Name     = "axLicenseControl1";
     this.axLicenseControl1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axLicenseControl1.OcxState")));
     this.axLicenseControl1.Size     = new System.Drawing.Size(200, 50);
     this.axLicenseControl1.TabIndex = 7;
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(680, 454);
     this.Controls.Add(this.axLicenseControl1);
     this.Controls.Add(this.axMapControl1);
     this.Controls.Add(this.cmdFullExtent);
     this.Controls.Add(this.chkTracking);
     this.Controls.Add(this.Label1);
     this.Name  = "Form1";
     this.Text  = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.axMapControl1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.axLicenseControl1)).EndInit();
     this.ResumeLayout(false);
 }
示例#45
0
        public override void Execute()
        {
            if (SearchEngineUrl == null || !Uri.IsWellFormedUriString(PopulateSearchEngingUrl("Nothing"), UriKind.Absolute))
            {
                return;
            }

            var t = new Thread(() =>
            {
                var clipboardMonitor = new ClipboardMonitor();

                clipboardMonitor.MonitorRegistered += () =>
                {
                    var timer = new Timer()
                    {
                        Interval = 2000
                    };
                    timer.Tick += (sender, args) =>
                    {
                        Debug.WriteLine("WebSearchCommand Timeout!");
                        timer.Enabled = false;

                        clipboardMonitor.StopMonitor();
                        clipboardMonitor.DestroyHandle();
                        Application.ExitThread();

                        Debug.WriteLine("超时结束 WebSearchCommand Runloop");
                    };

                    timer.Enabled = true;

                    try
                    {
                        Sim.KeyDown(VirtualKeyCode.CONTROL);
                        Sim.KeyDown(VirtualKeyCode.VK_C);

                        Sim.KeyUp(VirtualKeyCode.VK_C);
                        Sim.KeyUp(VirtualKeyCode.CONTROL);
                        //_sim.Keyboard.ModifiedKeyStroke(VirtualKeyCode.CONTROL, new[] { VirtualKeyCode.VK_C });
                    }
                    catch (Exception ex)
                    {
                        Debug.WriteLine("发送按键失败:" + ex);
                        Native.TryResetKeys(new [] { VirtualKeyCode.CONTROL, VirtualKeyCode.VK_C });
#if DEBUG
                        //throw;
#endif
                    }
                };

                clipboardMonitor.ClipboardUpdated += args =>
                {
                    Debug.WriteLine("ClipboardChanged");
                    args.Handled = true;

                    var text = "";
                    if (Clipboard.ContainsText() && (text = Clipboard.GetText().Trim()).Length > 0)
                    {
                        var browser = GetDefaultBrowserPath();
                        if (UseBrowser != null && File.Exists(UseBrowser.Replace("\"", "")))
                        {
                            browser = UseBrowser;
                        }

                        string urlToOpen;
                        //如果是URL则打开,否则搜索
                        if (Uri.IsWellFormedUriString(text, UriKind.Absolute))
                        {
                            urlToOpen = text;
                        }
                        else
                        {
                            if (text.Length > 100)
                            {
                                text = text.Substring(0, 100);
                            }
                            urlToOpen = PopulateSearchEngingUrl(text);
                        }
                        //M$ Edge Hack
                        if (browser.Contains("LaunchWinApp.exe"))
                        {
                            urlToOpen = "microsoft-edge:" + urlToOpen;
                            Process.Start(urlToOpen);
                        }
                        else
                        {
                            var startInfo = new ProcessStartInfo(browser, "\"" + urlToOpen + "\"");
                            using (Process.Start(startInfo));
                        }
                    }

                    clipboardMonitor.StopMonitor();
                    clipboardMonitor.DestroyHandle();

                    Application.ExitThread();
                };

                clipboardMonitor.StartMonitor();

                Application.Run();
                Debug.WriteLine("Thread End?");
            })
            {
                Name = "WebSearchCommand Runloop(Bug!我不应该存在!)"
            };

            t.SetApartmentState(ApartmentState.STA);
            t.IsBackground = true;
            t.Start();
        }
示例#46
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要使用代码编辑器修改
 /// 此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmBusynessForm));
     this.m_lblMessage = new System.Windows.Forms.Label();
     this.m_cmdYes     = new PinkieControls.ButtonXP();
     this.picClock     = new System.Windows.Forms.PictureBox();
     this.timer1       = new System.Windows.Forms.Timer(this.components);
     this.SuspendLayout();
     //
     // m_lblMessage
     //
     this.m_lblMessage.Font      = new System.Drawing.Font("宋体", 10.5F);
     this.m_lblMessage.Location  = new System.Drawing.Point(92, 16);
     this.m_lblMessage.Name      = "m_lblMessage";
     this.m_lblMessage.Size      = new System.Drawing.Size(204, 68);
     this.m_lblMessage.TabIndex  = 0;
     this.m_lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // m_cmdYes
     //
     this.m_cmdYes.BackColor     = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(255)), ((System.Byte)(240)), ((System.Byte)(202)));
     this.m_cmdYes.DefaultScheme = true;
     this.m_cmdYes.DialogResult  = System.Windows.Forms.DialogResult.Cancel;
     this.m_cmdYes.Hint          = "";
     this.m_cmdYes.Location      = new System.Drawing.Point(300, 56);
     this.m_cmdYes.Name          = "m_cmdYes";
     this.m_cmdYes.Scheme        = PinkieControls.ButtonXP.Schemes.Blue;
     this.m_cmdYes.Size          = new System.Drawing.Size(56, 28);
     this.m_cmdYes.TabIndex      = 1;
     this.m_cmdYes.Text          = "确 定";
     this.m_cmdYes.Visible       = false;
     this.m_cmdYes.Click        += new System.EventHandler(this.m_cmdYes_Click);
     //
     // picClock
     //
     this.picClock.Image    = ((System.Drawing.Image)(resources.GetObject("picClock.Image")));
     this.picClock.Location = new System.Drawing.Point(12, 14);
     this.picClock.Name     = "picClock";
     this.picClock.Size     = new System.Drawing.Size(68, 68);
     this.picClock.TabIndex = 2;
     this.picClock.TabStop  = false;
     //
     // timer1
     //
     this.timer1.Interval = 1000;
     this.timer1.Tick    += new System.EventHandler(this.timer1_Tick);
     //
     // frmBusynessForm
     //
     this.AcceptButton      = this.m_cmdYes;
     this.AutoScaleBaseSize = new System.Drawing.Size(7, 16);
     this.BackColor         = System.Drawing.SystemColors.Desktop;
     this.CancelButton      = this.m_cmdYes;
     this.ClientSize        = new System.Drawing.Size(360, 96);
     this.Controls.Add(this.picClock);
     this.Controls.Add(this.m_cmdYes);
     this.Controls.Add(this.m_lblMessage);
     this.Cursor          = System.Windows.Forms.Cursors.WaitCursor;
     this.Font            = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "frmBusynessForm";
     this.Opacity         = 0.8;
     this.ShowInTaskbar   = false;
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.TopMost         = true;
     this.Activated      += new System.EventHandler(this.frmBusynessForm_Activated);
     this.ResumeLayout(false);
 }
示例#47
0
        /// <summary>
        /// Method that starts or pauses the recording
        /// </summary>
        private async void RecordPause()
        {
            switch (Stage)
            {
            case Stage.Stopped:

                #region To Record

                _capture = new Timer {
                    Interval = 1000 / FpsIntegerUpDown.Value
                };
                _snapDelay = null;

                Project = new ProjectInfo().CreateProjectFolder();

                _keyList.Clear();
                FrameCount = 0;

                await Task.Factory.StartNew(UpdateScreenDpi);

                //Sizing.
                _size = new Size((int)Math.Round((Width - Constants.HorizontalOffset) * _scale), (int)Math.Round((Height - Constants.VerticalOffset) * _scale));

                HeightIntegerBox.IsEnabled = false;
                WidthIntegerBox.IsEnabled  = false;
                FpsIntegerUpDown.IsEnabled = false;

                IsRecording = true;
                Topmost     = true;

                FrameRate.Start(_capture.Interval);
                UnregisterEvents();

                #region Start

                if (UserSettings.All.UsePreStart)
                {
                    Title = $"Screen To Gif ({FindResource("Recorder.PreStart")} {UserSettings.All.PreStartValue}s)";
                    RecordPauseButton.IsEnabled = false;

                    Stage          = Stage.PreStarting;
                    _preStartCount = UserSettings.All.PreStartValue - 1;

                    _preStartTimer.Start();
                }
                else
                {
                    if (UserSettings.All.ShowCursor)
                    {
                        #region If Show Cursor

                        if (UserSettings.All.AsyncRecording)
                        {
                            _capture.Tick += CursorAsync_Elapsed;
                        }
                        else
                        {
                            _capture.Tick += Cursor_Elapsed;
                        }

                        _capture.Start();

                        Stage = Stage.Recording;

                        AutoFitButtons();

                        #endregion
                    }
                    else
                    {
                        #region If Not

                        if (UserSettings.All.AsyncRecording)
                        {
                            _capture.Tick += NormalAsync_Elapsed;
                        }
                        else
                        {
                            _capture.Tick += Normal_Elapsed;
                        }

                        _capture.Start();

                        Stage = Stage.Recording;

                        AutoFitButtons();

                        #endregion
                    }
                }
                break;

                #endregion

                #endregion

            case Stage.Recording:

                #region To Pause

                Stage = Stage.Paused;
                Title = FindResource("Recorder.Paused").ToString();

                DiscardButton.BeginStoryboard(FindResource("ShowDiscardStoryboard") as Storyboard, HandoffBehavior.Compose);

                AutoFitButtons();

                _capture.Stop();

                FrameRate.Stop();
                break;

                #endregion

            case Stage.Paused:

                #region To Record Again

                Stage = Stage.Recording;
                Title = "Screen To Gif";

                DiscardButton.BeginStoryboard(FindResource("HideDiscardStoryboard") as Storyboard, HandoffBehavior.Compose);

                AutoFitButtons();

                FrameRate.Start(_capture.Interval);

                _capture.Start();
                break;

                #endregion
            }
        }
示例#48
0
        private void WelcomeForm_Load(object sender, System.EventArgs e)
        {
            Language.LoadControlNames(this);

            this.BringToFront();

            langSel.Items.AddRange(Language.GetPackNames());
            langSel.SelectedItem = Language.Current;

            showAtStart.Checked = Utility.ToInt32(Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, "ShowWindow"), 1) == 1;

            clientList.Items.Add(Language.GetString(LocString.Auto2D));
            clientList.Items.Add(Language.GetString(LocString.Auto3D));
            for (int i = 1; ; i++)
            {
                string val = String.Format("Client{0}", i);
                string cli = Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, val);
                if (cli == null || cli == "")
                {
                    break;
                }
                if (File.Exists(cli))
                {
                    clientList.Items.Add(new PathElipsis(cli));
                }
                Config.DeleteRegValue(Microsoft.Win32.Registry.CurrentUser, val);
            }
            int sel = Utility.ToInt32(Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, "DefClient"), 0);

            if (sel >= clientList.Items.Count)
            {
                sel = 0;
                Config.SetRegString(Microsoft.Win32.Registry.CurrentUser, "DefClient", "0");
            }
            clientList.SelectedIndex = sel;

            dataDir.Items.Add(Language.GetString(LocString.AutoDetect));
            for (int i = 1; ; i++)
            {
                string val = String.Format("Dir{0}", i);
                string dir = Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, val);
                if (dir == null || dir == "")
                {
                    break;
                }
                if (Directory.Exists(dir))
                {
                    dataDir.Items.Add(dir);
                }
                Config.DeleteRegValue(Microsoft.Win32.Registry.CurrentUser, val);
            }

            try
            {
                dataDir.SelectedIndex = Convert.ToInt32(Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, "LastDir"));
            }
            catch
            {
                dataDir.SelectedIndex = 0;
            }

            patchEncy.Checked = Utility.ToInt32(Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, "PatchEncy"), 1) != 0;
            useEnc.Checked    = Utility.ToInt32(Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, "ServerEnc"), 0) != 0;

            LoginCFG_SE lse = new LoginCFG_SE();
            UOGamers_SE uog;

            serverList.BeginUpdate();

            //serverList.Items.Add( lse=new LoginCFG_SE() );
            //serverList.SelectedItem = lse;

            for (int i = 1; ; i++)
            {
                ServerEntry se;
                string      sval = String.Format("Server{0}", i);
                string      serv = Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, sval);
                if (serv == null)
                {
                    break;
                }
                string pval = String.Format("Port{0}", i);
                int    port = Utility.ToInt32(Config.GetRegString(Microsoft.Win32.Registry.CurrentUser, pval), 0);
                serverList.Items.Add(se = new ServerEntry(serv, port));
                if (serv == lse.RealAddress && port == lse.Port)
                {
                    serverList.SelectedItem = se;
                }
                Config.DeleteRegValue(Microsoft.Win32.Registry.CurrentUser, sval);
                Config.DeleteRegValue(Microsoft.Win32.Registry.CurrentUser, pval);
            }

            serverList.Items.Add(uog = new UOGamers_SE("Zenvera (UOR)", "login.zenvera.com"));
            if (serverList.SelectedItem == null || lse.RealAddress == uog.RealAddress && lse.Port == 2593)
            {
                serverList.SelectedItem = uog;
            }

            serverList.Items.Add(uog = new UOGamers_SE("Second Age (T2A)", "login.uosecondage.com"));
            if (lse.RealAddress == uog.RealAddress && lse.Port == 2593)
            {
                serverList.SelectedItem = uog;
            }

            serverList.Items.Add(uog = new UOGamers_SE("An Corp (T2A)", "login.uoancorp.com"));
            if (lse.RealAddress == uog.RealAddress && lse.Port == 2593)
            {
                serverList.SelectedItem = uog;
            }

            serverList.Items.Add(uog = new UOGamers_SE("Forever (P16)", "login.uoforever.com", 2599));
            if (lse.RealAddress == uog.RealAddress && lse.Port == 2599)
            {
                serverList.SelectedItem = uog;
            }

            serverList.Items.Add(uog = new UOGamers_SE("Pandora (HS)", "play.pandorauo.com"));
            if (lse.RealAddress == uog.RealAddress && lse.Port == 2593)
            {
                serverList.SelectedItem = uog;
            }

            serverList.Items.Add(uog = new UOGamers_SE("Electronic Arts/Origin Servers", "login.ultimaonline.com", 7775));
            if (lse.RealAddress == uog.RealAddress && (lse.Port >= 7775 && lse.Port <= 7778))
            {
                serverList.SelectedItem = uog;
            }

            serverList.EndUpdate();

            serverList.Refresh();

            WindowState = FormWindowState.Normal;
            this.BringToFront();
            this.TopMost = true;

            _ShowTimer          = new System.Windows.Forms.Timer();
            _ShowTimer.Interval = 250;
            _ShowTimer.Enabled  = true;
            _ShowTimer.Tick    += new EventHandler(timer_Tick);
        }
示例#49
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components             = new System.ComponentModel.Container();
     this.tabControl_SetTime     = new System.Windows.Forms.TabControl();
     this.tabPage_Relative       = new System.Windows.Forms.TabPage();
     this.relative_settime       = new System.Windows.Forms.Button();
     this.relative_hour          = new System.Windows.Forms.NumericUpDown();
     this.relative_minute        = new System.Windows.Forms.NumericUpDown();
     this.relative_second        = new System.Windows.Forms.NumericUpDown();
     this.relative_days          = new System.Windows.Forms.NumericUpDown();
     this.label2                 = new System.Windows.Forms.Label();
     this.label3                 = new System.Windows.Forms.Label();
     this.ZeroRelative           = new System.Windows.Forms.Button();
     this.tabPage_Accelerated    = new System.Windows.Forms.TabPage();
     this.accelerated_setslew    = new System.Windows.Forms.Button();
     this.SlewRateInput          = new System.Windows.Forms.NumericUpDown();
     this.label7                 = new System.Windows.Forms.Label();
     this.label8                 = new System.Windows.Forms.Label();
     this.Display_SystemTimeNow  = new System.Windows.Forms.TextBox();
     this.label4                 = new System.Windows.Forms.Label();
     this.display_VSystemTimeNow = new System.Windows.Forms.TextBox();
     this.label5                 = new System.Windows.Forms.Label();
     this.label6                 = new System.Windows.Forms.Label();
     this.display_ClockSlewRate  = new System.Windows.Forms.TextBox();
     this.DisplayUpdateTimer     = new System.Windows.Forms.Timer(this.components);
     this.label1                 = new System.Windows.Forms.Label();
     this.displayCurrentOffset   = new System.Windows.Forms.TextBox();
     this.displayAccumulatedSlew = new System.Windows.Forms.TextBox();
     this.label9                 = new System.Windows.Forms.Label();
     this.tabControl_SetTime.SuspendLayout();
     this.tabPage_Relative.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.relative_hour)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.relative_minute)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.relative_second)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.relative_days)).BeginInit();
     this.tabPage_Accelerated.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.SlewRateInput)).BeginInit();
     this.SuspendLayout();
     //
     // tabControl_SetTime
     //
     this.tabControl_SetTime.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.tabPage_Relative,
         this.tabPage_Accelerated
     });
     this.tabControl_SetTime.Location      = new System.Drawing.Point(8, 8);
     this.tabControl_SetTime.Name          = "tabControl_SetTime";
     this.tabControl_SetTime.SelectedIndex = 0;
     this.tabControl_SetTime.Size          = new System.Drawing.Size(712, 256);
     this.tabControl_SetTime.TabIndex      = 0;
     //
     // tabPage_Relative
     //
     this.tabPage_Relative.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.relative_settime,
         this.relative_hour,
         this.relative_minute,
         this.relative_second,
         this.relative_days,
         this.label2,
         this.label3,
         this.ZeroRelative
     });
     this.tabPage_Relative.Location = new System.Drawing.Point(4, 22);
     this.tabPage_Relative.Name     = "tabPage_Relative";
     this.tabPage_Relative.Size     = new System.Drawing.Size(704, 230);
     this.tabPage_Relative.TabIndex = 1;
     this.tabPage_Relative.Text     = "RelativeTime";
     //
     // relative_settime
     //
     this.relative_settime.Location = new System.Drawing.Point(424, 136);
     this.relative_settime.Name     = "relative_settime";
     this.relative_settime.Size     = new System.Drawing.Size(96, 23);
     this.relative_settime.TabIndex = 2;
     this.relative_settime.Text     = "SetTime";
     this.relative_settime.Click   += new System.EventHandler(this.relative_settime_Click);
     //
     // relative_hour
     //
     this.relative_hour.Location = new System.Drawing.Point(240, 136);
     this.relative_hour.Maximum  = new System.Decimal(new int[] {
         23,
         0,
         0,
         0
     });
     this.relative_hour.Name     = "relative_hour";
     this.relative_hour.Size     = new System.Drawing.Size(40, 20);
     this.relative_hour.TabIndex = 0;
     //
     // relative_minute
     //
     this.relative_minute.Location = new System.Drawing.Point(280, 136);
     this.relative_minute.Maximum  = new System.Decimal(new int[] {
         59,
         0,
         0,
         0
     });
     this.relative_minute.Name     = "relative_minute";
     this.relative_minute.Size     = new System.Drawing.Size(40, 20);
     this.relative_minute.TabIndex = 0;
     //
     // relative_second
     //
     this.relative_second.Location = new System.Drawing.Point(320, 136);
     this.relative_second.Maximum  = new System.Decimal(new int[] {
         59,
         0,
         0,
         0
     });
     this.relative_second.Name     = "relative_second";
     this.relative_second.Size     = new System.Drawing.Size(40, 20);
     this.relative_second.TabIndex = 0;
     //
     // relative_days
     //
     this.relative_days.Location = new System.Drawing.Point(192, 136);
     this.relative_days.Maximum  = new System.Decimal(new int[] {
         3650,
         0,
         0,
         0
     });
     this.relative_days.Name     = "relative_days";
     this.relative_days.Size     = new System.Drawing.Size(40, 20);
     this.relative_days.TabIndex = 0;
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(80, 136);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(88, 16);
     this.label2.TabIndex = 1;
     this.label2.Text     = "Day:HH:MM:SS";
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(16, 32);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(464, 56);
     this.label3.TabIndex = 1;
     this.label3.Text     = "Set the desired interval to add to the current time, and press button to set the " +
                            "relative time.  You cannot set time backwards.  The \"Minimum Val.\" button will s" +
                            "et the interval to the minimum legal value.";
     //
     // ZeroRelative
     //
     this.ZeroRelative.Location = new System.Drawing.Point(424, 176);
     this.ZeroRelative.Name     = "ZeroRelative";
     this.ZeroRelative.Size     = new System.Drawing.Size(96, 23);
     this.ZeroRelative.TabIndex = 2;
     this.ZeroRelative.Text     = "Minimum Val.";
     this.ZeroRelative.Click   += new System.EventHandler(this.ZeroRelative_Click);
     //
     // tabPage_Accelerated
     //
     this.tabPage_Accelerated.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.accelerated_setslew,
         this.SlewRateInput,
         this.label7,
         this.label8
     });
     this.tabPage_Accelerated.Location = new System.Drawing.Point(4, 22);
     this.tabPage_Accelerated.Name     = "tabPage_Accelerated";
     this.tabPage_Accelerated.Size     = new System.Drawing.Size(704, 230);
     this.tabPage_Accelerated.TabIndex = 2;
     this.tabPage_Accelerated.Text     = "AcceleratedTime";
     //
     // accelerated_setslew
     //
     this.accelerated_setslew.Location = new System.Drawing.Point(56, 120);
     this.accelerated_setslew.Name     = "accelerated_setslew";
     this.accelerated_setslew.TabIndex = 6;
     this.accelerated_setslew.Text     = "Set Slew";
     this.accelerated_setslew.Click   += new System.EventHandler(this.accelerated_setslew_Click);
     //
     // SlewRateInput
     //
     this.SlewRateInput.DecimalPlaces = 2;
     this.SlewRateInput.Location      = new System.Drawing.Point(160, 88);
     this.SlewRateInput.Maximum       = new System.Decimal(new int[] {
         1000,
         0,
         0,
         0
     });
     this.SlewRateInput.Name     = "SlewRateInput";
     this.SlewRateInput.Size     = new System.Drawing.Size(80, 20);
     this.SlewRateInput.TabIndex = 4;
     this.SlewRateInput.Value    = new System.Decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.SlewRateInput.ValueChanged += new System.EventHandler(this.SlewRateInput_ValueChanged);
     //
     // label7
     //
     this.label7.Location = new System.Drawing.Point(48, 88);
     this.label7.Name     = "label7";
     this.label7.Size     = new System.Drawing.Size(112, 16);
     this.label7.TabIndex = 5;
     this.label7.Text     = "Accelerate Clock ";
     //
     // label8
     //
     this.label8.Location = new System.Drawing.Point(256, 88);
     this.label8.Name     = "label8";
     this.label8.Size     = new System.Drawing.Size(112, 16);
     this.label8.TabIndex = 5;
     this.label8.Text     = "times normal.";
     //
     // Display_SystemTimeNow
     //
     this.Display_SystemTimeNow.CausesValidation = false;
     this.Display_SystemTimeNow.Location         = new System.Drawing.Point(208, 288);
     this.Display_SystemTimeNow.Name             = "Display_SystemTimeNow";
     this.Display_SystemTimeNow.ReadOnly         = true;
     this.Display_SystemTimeNow.Size             = new System.Drawing.Size(160, 20);
     this.Display_SystemTimeNow.TabIndex         = 1;
     this.Display_SystemTimeNow.TabStop          = false;
     this.Display_SystemTimeNow.Tag  = "";
     this.Display_SystemTimeNow.Text = "";
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(96, 288);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(104, 23);
     this.label4.TabIndex = 2;
     this.label4.Text     = "SystemTime() now:";
     //
     // display_VSystemTimeNow
     //
     this.display_VSystemTimeNow.CausesValidation = false;
     this.display_VSystemTimeNow.Location         = new System.Drawing.Point(208, 328);
     this.display_VSystemTimeNow.Name             = "display_VSystemTimeNow";
     this.display_VSystemTimeNow.ReadOnly         = true;
     this.display_VSystemTimeNow.Size             = new System.Drawing.Size(160, 20);
     this.display_VSystemTimeNow.TabIndex         = 1;
     this.display_VSystemTimeNow.TabStop          = false;
     this.display_VSystemTimeNow.Tag  = "";
     this.display_VSystemTimeNow.Text = "";
     //
     // label5
     //
     this.label5.Location = new System.Drawing.Point(56, 328);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(144, 23);
     this.label5.TabIndex = 2;
     this.label5.Text     = "VirtualSystemTime() now:";
     //
     // label6
     //
     this.label6.Location = new System.Drawing.Point(416, 376);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(104, 16);
     this.label6.TabIndex = 2;
     this.label6.Text     = "Clock Slew rate:";
     //
     // display_ClockSlewRate
     //
     this.display_ClockSlewRate.CausesValidation = false;
     this.display_ClockSlewRate.Location         = new System.Drawing.Point(528, 376);
     this.display_ClockSlewRate.Name             = "display_ClockSlewRate";
     this.display_ClockSlewRate.ReadOnly         = true;
     this.display_ClockSlewRate.Size             = new System.Drawing.Size(160, 20);
     this.display_ClockSlewRate.TabIndex         = 1;
     this.display_ClockSlewRate.TabStop          = false;
     this.display_ClockSlewRate.Tag  = "";
     this.display_ClockSlewRate.Text = "";
     //
     // DisplayUpdateTimer
     //
     this.DisplayUpdateTimer.Enabled  = true;
     this.DisplayUpdateTimer.Interval = 1000;
     this.DisplayUpdateTimer.Tick    += new System.EventHandler(this.timer1_Tick);
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(416, 288);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(104, 23);
     this.label1.TabIndex = 2;
     this.label1.Text     = "Current Offset:";
     //
     // displayCurrentOffset
     //
     this.displayCurrentOffset.CausesValidation = false;
     this.displayCurrentOffset.Location         = new System.Drawing.Point(528, 288);
     this.displayCurrentOffset.Name             = "displayCurrentOffset";
     this.displayCurrentOffset.ReadOnly         = true;
     this.displayCurrentOffset.Size             = new System.Drawing.Size(160, 20);
     this.displayCurrentOffset.TabIndex         = 1;
     this.displayCurrentOffset.TabStop          = false;
     this.displayCurrentOffset.Tag  = "";
     this.displayCurrentOffset.Text = "";
     //
     // displayAccumulatedSlew
     //
     this.displayAccumulatedSlew.CausesValidation = false;
     this.displayAccumulatedSlew.Location         = new System.Drawing.Point(528, 328);
     this.displayAccumulatedSlew.Name             = "displayAccumulatedSlew";
     this.displayAccumulatedSlew.ReadOnly         = true;
     this.displayAccumulatedSlew.Size             = new System.Drawing.Size(160, 20);
     this.displayAccumulatedSlew.TabIndex         = 1;
     this.displayAccumulatedSlew.TabStop          = false;
     this.displayAccumulatedSlew.Tag  = "";
     this.displayAccumulatedSlew.Text = "";
     //
     // label9
     //
     this.label9.Location = new System.Drawing.Point(416, 328);
     this.label9.Name     = "label9";
     this.label9.Size     = new System.Drawing.Size(104, 23);
     this.label9.TabIndex = 2;
     this.label9.Text     = "Accumulated Slew:";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(736, 421);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.label4,
         this.Display_SystemTimeNow,
         this.tabControl_SetTime,
         this.display_VSystemTimeNow,
         this.label5,
         this.label6,
         this.display_ClockSlewRate,
         this.label1,
         this.displayCurrentOffset,
         this.displayAccumulatedSlew,
         this.label9
     });
     this.Name = "Form1";
     this.Text = "Form1";
     this.tabControl_SetTime.ResumeLayout(false);
     this.tabPage_Relative.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.relative_hour)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.relative_minute)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.relative_second)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.relative_days)).EndInit();
     this.tabPage_Accelerated.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.SlewRateInput)).EndInit();
     this.ResumeLayout(false);
 }
示例#50
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components         = new System.ComponentModel.Container();
     this.pnlTreeview        = new System.Windows.Forms.Panel();
     this.treServers         = new System.Windows.Forms.TreeView();
     this.splitter1          = new System.Windows.Forms.Splitter();
     this.txtInput           = new System.Windows.Forms.TextBox();
     this.txtOutput          = new System.Windows.Forms.TextBox();
     this.PlayerTab          = new System.Windows.Forms.TabPage();
     this.label2             = new System.Windows.Forms.Label();
     this.txtCredits         = new System.Windows.Forms.TextBox();
     this.btnGetInfo         = new System.Windows.Forms.Button();
     this.label1             = new System.Windows.Forms.Label();
     this.txtOID             = new System.Windows.Forms.TextBox();
     this.lblPlayerName      = new System.Windows.Forms.Label();
     this.txtPlayerName      = new System.Windows.Forms.TextBox();
     this.tmrRead            = new System.Windows.Forms.Timer(this.components);
     this.label3             = new System.Windows.Forms.Label();
     this.txtLots            = new System.Windows.Forms.TextBox();
     this.tabMain            = new System.Windows.Forms.TabControl();
     this.PlayerTabs         = new System.Windows.Forms.TabPage();
     this.PlayerTab2         = new SwgCsTool.PlayerTab();
     this.tabAdmin1          = new System.Windows.Forms.TabPage();
     this.AdministrationTab1 = new SwgCsTool.AdministrationTab();
     this.tabPage1           = new System.Windows.Forms.TabPage();
     this.ItemMovementTab1   = new SwgCsTool.ItemMovementTab();
     this.StructuresTab      = new System.Windows.Forms.TabPage();
     this.StructuresListTab  = new SwgCsTool.StructuresListTab();
     this.PlayerTab1         = new SwgCsTool.PlayerTab();
     this.tabAdmin2          = new SwgCsTool.AdministrationTab();
     this.pnlTreeview.SuspendLayout();
     this.tabMain.SuspendLayout();
     this.PlayerTabs.SuspendLayout();
     this.tabAdmin1.SuspendLayout();
     this.tabPage1.SuspendLayout();
     this.StructuresTab.SuspendLayout();
     this.SuspendLayout();
     //
     // pnlTreeview
     //
     this.pnlTreeview.Controls.Add(this.treServers);
     this.pnlTreeview.Dock     = System.Windows.Forms.DockStyle.Left;
     this.pnlTreeview.Location = new System.Drawing.Point(0, 0);
     this.pnlTreeview.Name     = "pnlTreeview";
     this.pnlTreeview.Size     = new System.Drawing.Size(144, 558);
     this.pnlTreeview.TabIndex = 0;
     //
     // treServers
     //
     this.treServers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)
                                                                    | System.Windows.Forms.AnchorStyles.Right)));
     this.treServers.CheckBoxes  = true;
     this.treServers.Location    = new System.Drawing.Point(8, 8);
     this.treServers.Name        = "treServers";
     this.treServers.Size        = new System.Drawing.Size(136, 544);
     this.treServers.TabIndex    = 0;
     this.treServers.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treServers_AfterCheck);
     //
     // splitter1
     //
     this.splitter1.Location = new System.Drawing.Point(144, 0);
     this.splitter1.Name     = "splitter1";
     this.splitter1.Size     = new System.Drawing.Size(3, 558);
     this.splitter1.TabIndex = 1;
     this.splitter1.TabStop  = false;
     //
     // txtInput
     //
     this.txtInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                  | System.Windows.Forms.AnchorStyles.Right)));
     this.txtInput.Location  = new System.Drawing.Point(152, 536);
     this.txtInput.Name      = "txtInput";
     this.txtInput.Size      = new System.Drawing.Size(672, 20);
     this.txtInput.TabIndex  = 2;
     this.txtInput.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtInput_KeyPress);
     //
     // txtOutput
     //
     this.txtOutput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.txtOutput.Location   = new System.Drawing.Point(152, 456);
     this.txtOutput.Multiline  = true;
     this.txtOutput.Name       = "txtOutput";
     this.txtOutput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
     this.txtOutput.Size       = new System.Drawing.Size(672, 80);
     this.txtOutput.TabIndex   = 3;
     //
     // PlayerTab
     //
     this.PlayerTab.Location = new System.Drawing.Point(0, 0);
     this.PlayerTab.Name     = "PlayerTab";
     this.PlayerTab.Size     = new System.Drawing.Size(200, 100);
     this.PlayerTab.TabIndex = 0;
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(0, 0);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(100, 23);
     this.label2.TabIndex = 0;
     //
     // txtCredits
     //
     this.txtCredits.Location = new System.Drawing.Point(0, 0);
     this.txtCredits.Name     = "txtCredits";
     this.txtCredits.Size     = new System.Drawing.Size(100, 20);
     this.txtCredits.TabIndex = 0;
     //
     // btnGetInfo
     //
     this.btnGetInfo.Location = new System.Drawing.Point(0, 0);
     this.btnGetInfo.Name     = "btnGetInfo";
     this.btnGetInfo.Size     = new System.Drawing.Size(75, 23);
     this.btnGetInfo.TabIndex = 0;
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(0, 0);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(100, 23);
     this.label1.TabIndex = 0;
     //
     // txtOID
     //
     this.txtOID.Location = new System.Drawing.Point(0, 0);
     this.txtOID.Name     = "txtOID";
     this.txtOID.Size     = new System.Drawing.Size(100, 20);
     this.txtOID.TabIndex = 0;
     //
     // lblPlayerName
     //
     this.lblPlayerName.Location = new System.Drawing.Point(0, 0);
     this.lblPlayerName.Name     = "lblPlayerName";
     this.lblPlayerName.Size     = new System.Drawing.Size(100, 23);
     this.lblPlayerName.TabIndex = 0;
     //
     // txtPlayerName
     //
     this.txtPlayerName.Location = new System.Drawing.Point(0, 0);
     this.txtPlayerName.Name     = "txtPlayerName";
     this.txtPlayerName.Size     = new System.Drawing.Size(100, 20);
     this.txtPlayerName.TabIndex = 0;
     //
     // tmrRead
     //
     this.tmrRead.Enabled = true;
     this.tmrRead.Tick   += new System.EventHandler(this.tmrRead_Tick);
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(0, 0);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(100, 23);
     this.label3.TabIndex = 0;
     //
     // txtLots
     //
     this.txtLots.Location = new System.Drawing.Point(0, 0);
     this.txtLots.Name     = "txtLots";
     this.txtLots.Size     = new System.Drawing.Size(100, 20);
     this.txtLots.TabIndex = 0;
     //
     // tabMain
     //
     this.tabMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                  | System.Windows.Forms.AnchorStyles.Left)
                                                                 | System.Windows.Forms.AnchorStyles.Right)));
     this.tabMain.Controls.Add(this.PlayerTabs);
     this.tabMain.Controls.Add(this.tabAdmin1);
     this.tabMain.Controls.Add(this.tabPage1);
     this.tabMain.Controls.Add(this.StructuresTab);
     this.tabMain.Location      = new System.Drawing.Point(152, 8);
     this.tabMain.Name          = "tabMain";
     this.tabMain.SelectedIndex = 0;
     this.tabMain.Size          = new System.Drawing.Size(672, 440);
     this.tabMain.TabIndex      = 4;
     //
     // PlayerTabs
     //
     this.PlayerTabs.Controls.Add(this.PlayerTab2);
     this.PlayerTabs.Location = new System.Drawing.Point(4, 22);
     this.PlayerTabs.Name     = "PlayerTabs";
     this.PlayerTabs.Size     = new System.Drawing.Size(664, 414);
     this.PlayerTabs.TabIndex = 0;
     this.PlayerTabs.Text     = "PC Info";
     this.PlayerTabs.UseVisualStyleBackColor = true;
     //
     // PlayerTab2
     //
     this.PlayerTab2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)
                                                                    | System.Windows.Forms.AnchorStyles.Right)));
     this.PlayerTab2.Location = new System.Drawing.Point(0, 0);
     this.PlayerTab2.Name     = "PlayerTab2";
     this.PlayerTab2.Size     = new System.Drawing.Size(664, 416);
     this.PlayerTab2.TabIndex = 0;
     //
     // tabAdmin1
     //
     this.tabAdmin1.Controls.Add(this.AdministrationTab1);
     this.tabAdmin1.Location = new System.Drawing.Point(4, 22);
     this.tabAdmin1.Name     = "tabAdmin1";
     this.tabAdmin1.Size     = new System.Drawing.Size(664, 414);
     this.tabAdmin1.TabIndex = 1;
     this.tabAdmin1.Text     = "Administration";
     this.tabAdmin1.UseVisualStyleBackColor = true;
     //
     // AdministrationTab1
     //
     this.AdministrationTab1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.AdministrationTab1.Location = new System.Drawing.Point(0, 0);
     this.AdministrationTab1.Name     = "AdministrationTab1";
     this.AdministrationTab1.Size     = new System.Drawing.Size(664, 414);
     this.AdministrationTab1.TabIndex = 0;
     //
     // tabPage1
     //
     this.tabPage1.Controls.Add(this.ItemMovementTab1);
     this.tabPage1.Location = new System.Drawing.Point(4, 22);
     this.tabPage1.Name     = "tabPage1";
     this.tabPage1.Size     = new System.Drawing.Size(664, 414);
     this.tabPage1.TabIndex = 2;
     this.tabPage1.Text     = "Item Movement";
     this.tabPage1.UseVisualStyleBackColor = true;
     //
     // ItemMovementTab1
     //
     this.ItemMovementTab1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.ItemMovementTab1.Location = new System.Drawing.Point(0, 0);
     this.ItemMovementTab1.Name     = "ItemMovementTab1";
     this.ItemMovementTab1.Size     = new System.Drawing.Size(664, 414);
     this.ItemMovementTab1.TabIndex = 0;
     //
     // StructuresTab
     //
     this.StructuresTab.Controls.Add(this.StructuresListTab);
     this.StructuresTab.Location = new System.Drawing.Point(4, 22);
     this.StructuresTab.Name     = "StructuresTab";
     this.StructuresTab.Padding  = new System.Windows.Forms.Padding(3);
     this.StructuresTab.Size     = new System.Drawing.Size(664, 414);
     this.StructuresTab.TabIndex = 3;
     this.StructuresTab.Text     = "Structures";
     this.StructuresTab.UseVisualStyleBackColor = true;
     //
     // StructuresListTab
     //
     this.StructuresListTab.AutoSize     = true;
     this.StructuresListTab.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.StructuresListTab.Dock         = System.Windows.Forms.DockStyle.Fill;
     this.StructuresListTab.Location     = new System.Drawing.Point(3, 3);
     this.StructuresListTab.Name         = "StructuresListTab";
     this.StructuresListTab.Size         = new System.Drawing.Size(658, 408);
     this.StructuresListTab.TabIndex     = 0;
     //
     // PlayerTab1
     //
     this.PlayerTab1.Location = new System.Drawing.Point(0, 0);
     this.PlayerTab1.Name     = "PlayerTab1";
     this.PlayerTab1.Size     = new System.Drawing.Size(400, 312);
     this.PlayerTab1.TabIndex = 0;
     //
     // tabAdmin2
     //
     this.tabAdmin2.Location = new System.Drawing.Point(4, 22);
     this.tabAdmin2.Name     = "tabAdmin2";
     this.tabAdmin2.Size     = new System.Drawing.Size(664, 414);
     this.tabAdmin2.TabIndex = 1;
     //
     // MainForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(832, 558);
     this.Controls.Add(this.tabMain);
     this.Controls.Add(this.txtOutput);
     this.Controls.Add(this.txtInput);
     this.Controls.Add(this.splitter1);
     this.Controls.Add(this.pnlTreeview);
     this.Name  = "MainForm";
     this.Text  = "SWG CS Tool";
     this.Load += new System.EventHandler(this.MainForm_Load);
     this.pnlTreeview.ResumeLayout(false);
     this.tabMain.ResumeLayout(false);
     this.PlayerTabs.ResumeLayout(false);
     this.tabAdmin1.ResumeLayout(false);
     this.tabPage1.ResumeLayout(false);
     this.StructuresTab.ResumeLayout(false);
     this.StructuresTab.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#51
0
        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(ExportForm));

            this.ExportPanel       = new Panel();
            this.vListBox          = new vListBox();
            this.imageList1        = new ImageList(this.components);
            this.progFile          = new vProgressBar();
            this.lblExportHash     = new Label();
            this.lblExportFileName = new Label();
            this.lbl_HashCode      = new Label();
            this.lbl_FileName      = new Label();
            this.picThumbnail      = new PictureBox();
            this.progBar           = new vProgressBar();
            this.timer1            = new System.Windows.Forms.Timer(this.components);
            this.HeaderPanel       = new Panel();
            this.lblExportMessage  = new Label();
            this.btnClose          = new vButton();
            this.pic             = new PictureBox();
            this.lbl_ExportFiles = new Label();
            this.ExportPanel.SuspendLayout();
            ((ISupportInitialize)this.picThumbnail).BeginInit();
            this.HeaderPanel.SuspendLayout();
            ((ISupportInitialize)this.pic).BeginInit();
            base.SuspendLayout();
            this.ExportPanel.BorderStyle = BorderStyle.FixedSingle;
            this.ExportPanel.Controls.Add(this.vListBox);
            this.ExportPanel.Controls.Add(this.progFile);
            this.ExportPanel.Controls.Add(this.lblExportHash);
            this.ExportPanel.Controls.Add(this.lblExportFileName);
            this.ExportPanel.Controls.Add(this.lbl_HashCode);
            this.ExportPanel.Controls.Add(this.lbl_FileName);
            this.ExportPanel.Controls.Add(this.picThumbnail);
            this.ExportPanel.Controls.Add(this.progBar);
            this.ExportPanel.Dock     = DockStyle.Fill;
            this.ExportPanel.Location = new Point(0, 45);
            this.ExportPanel.Name     = "ExportPanel";
            this.ExportPanel.Size     = new Size(560, 345);
            this.ExportPanel.TabIndex = 1;
            this.vListBox.Dock        = DockStyle.Bottom;
            this.vListBox.ImageList   = this.imageList1;
            this.vListBox.ItemHeight  = 34;
            this.vListBox.Location    = new Point(0, 122);
            this.vListBox.Name        = "vListBox";
            this.vListBox.RoundedCornersMaskListItem = 15;
            this.vListBox.Size     = new Size(558, 221);
            this.vListBox.TabIndex = 6;
            this.vListBox.VIBlendScrollBarsTheme = VIBLEND_THEME.OFFICE2010SILVER;
            this.vListBox.VIBlendTheme           = VIBLEND_THEME.OFFICE2010SILVER;
            this.imageList1.ImageStream          = (ImageListStreamer)Resources.ExportForm.imageList1_ImageStream;
            this.imageList1.TransparentColor     = Color.Transparent;
            this.imageList1.Images.SetKeyName(0, "copy.png");
            this.imageList1.Images.SetKeyName(1, "check.png");
            this.imageList1.Images.SetKeyName(2, "stop.png");
            this.imageList1.Images.SetKeyName(3, "completed.png");
            this.imageList1.Images.SetKeyName(4, "dvd.png");
            this.imageList1.Images.SetKeyName(5, "zip.png");
            this.progFile.BackColor          = Color.Transparent;
            this.progFile.Location           = new Point(178, 83);
            this.progFile.Name               = "progFile";
            this.progFile.RoundedCornersMask = 15;
            this.progFile.Size               = new Size(368, 26);
            this.progFile.TabIndex           = 1;
            this.progFile.Text               = "vProgressBar1";
            this.progFile.Value              = 0;
            this.progFile.VIBlendTheme       = VIBLEND_THEME.OFFICE2010SILVER;
            this.progFile.Visible            = false;
            this.lblExportHash.AutoSize      = true;
            this.lblExportHash.Location      = new Point(286, 29);
            this.lblExportHash.Name          = "lblExportHash";
            this.lblExportHash.Size          = new Size(57, 13);
            this.lblExportHash.TabIndex      = 5;
            this.lblExportHash.Text          = "hash code";
            this.lblExportFileName.AutoSize  = true;
            this.lblExportFileName.Location  = new Point(286, 5);
            this.lblExportFileName.Name      = "lblExportFileName";
            this.lblExportFileName.Size      = new Size(49, 13);
            this.lblExportFileName.TabIndex  = 4;
            this.lblExportFileName.Text      = "file name";
            this.lbl_HashCode.AutoSize       = true;
            this.lbl_HashCode.Location       = new Point(178, 29);
            this.lbl_HashCode.Name           = "lbl_HashCode";
            this.lbl_HashCode.Size           = new Size(79, 13);
            this.lbl_HashCode.TabIndex       = 3;
            this.lbl_HashCode.Text           = "File Hash Code";
            this.lbl_FileName.AutoSize       = true;
            this.lbl_FileName.Location       = new Point(178, 5);
            this.lbl_FileName.Name           = "lbl_FileName";
            this.lbl_FileName.Size           = new Size(54, 13);
            this.lbl_FileName.TabIndex       = 2;
            this.lbl_FileName.Text           = "File Name";
            this.picThumbnail.BackColor      = Color.Black;
            this.picThumbnail.Location       = new Point(11, 5);
            this.picThumbnail.Name           = "picThumbnail";
            this.picThumbnail.Size           = new Size(161, 105);
            this.picThumbnail.SizeMode       = PictureBoxSizeMode.StretchImage;
            this.picThumbnail.TabIndex       = 1;
            this.picThumbnail.TabStop        = false;
            this.progBar.BackColor           = Color.Transparent;
            this.progBar.Location            = new Point(178, 53);
            this.progBar.Name = "progBar";
            this.progBar.RoundedCornersMask = 15;
            this.progBar.Size          = new Size(368, 26);
            this.progBar.TabIndex      = 0;
            this.progBar.Text          = "vProgressBar1";
            this.progBar.Value         = 0;
            this.progBar.VIBlendTheme  = VIBLEND_THEME.OFFICE2010SILVER;
            this.timer1.Interval       = 500;
            this.timer1.Tick          += new EventHandler(this.timer1_Tick);
            this.HeaderPanel.BackColor = Color.FromArgb(64, 64, 64);
            this.HeaderPanel.Controls.Add(this.lblExportMessage);
            this.HeaderPanel.Controls.Add(this.btnClose);
            this.HeaderPanel.Controls.Add(this.pic);
            this.HeaderPanel.Controls.Add(this.lbl_ExportFiles);
            this.HeaderPanel.Dock            = DockStyle.Top;
            this.HeaderPanel.Location        = new Point(0, 0);
            this.HeaderPanel.Name            = "HeaderPanel";
            this.HeaderPanel.Size            = new Size(560, 45);
            this.HeaderPanel.TabIndex        = 0;
            this.HeaderPanel.MouseDown      += new MouseEventHandler(this.HeaderPanel_MouseDown);
            this.lblExportMessage.AutoSize   = true;
            this.lblExportMessage.BackColor  = Color.Transparent;
            this.lblExportMessage.ForeColor  = Color.White;
            this.lblExportMessage.Location   = new Point(66, 26);
            this.lblExportMessage.Name       = "lblExportMessage";
            this.lblExportMessage.Size       = new Size(93, 13);
            this.lblExportMessage.TabIndex   = 3;
            this.lblExportMessage.Text       = "Export to device...";
            this.lblExportMessage.MouseDown += new MouseEventHandler(this.lblMessage_MouseDown);
            this.btnClose.AllowAnimations    = true;
            this.btnClose.BackColor          = Color.Transparent;
            this.btnClose.Dock                    = DockStyle.Right;
            this.btnClose.Image                   = Properties.Resources.close;
            this.btnClose.Location                = new Point(515, 0);
            this.btnClose.Name                    = "btnClose";
            this.btnClose.PaintBorder             = false;
            this.btnClose.PaintDefaultBorder      = false;
            this.btnClose.PaintDefaultFill        = false;
            this.btnClose.RoundedCornersMask      = 15;
            this.btnClose.RoundedCornersRadius    = 0;
            this.btnClose.Size                    = new Size(45, 45);
            this.btnClose.TabIndex                = 2;
            this.btnClose.UseVisualStyleBackColor = false;
            this.btnClose.VIBlendTheme            = VIBLEND_THEME.VISTABLUE;
            this.btnClose.Click                  += new EventHandler(this.btnClose_Click);
            this.pic.BackColor                    = Color.Transparent;
            this.pic.Image                  = Properties.Resources.sentinel;
            this.pic.Location               = new Point(5, 5);
            this.pic.Name                   = "pic";
            this.pic.Size                   = new Size(36, 36);
            this.pic.SizeMode               = PictureBoxSizeMode.CenterImage;
            this.pic.TabIndex               = 1;
            this.pic.TabStop                = false;
            this.pic.MouseDown             += new MouseEventHandler(this.pic_MouseDown);
            this.lbl_ExportFiles.AutoSize   = true;
            this.lbl_ExportFiles.BackColor  = Color.Transparent;
            this.lbl_ExportFiles.Font       = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.lbl_ExportFiles.ForeColor  = Color.White;
            this.lbl_ExportFiles.Location   = new Point(66, 5);
            this.lbl_ExportFiles.Name       = "lbl_ExportFiles";
            this.lbl_ExportFiles.Size       = new Size(114, 16);
            this.lbl_ExportFiles.TabIndex   = 0;
            this.lbl_ExportFiles.Text       = "EXPORT FILES";
            this.lbl_ExportFiles.MouseDown += new MouseEventHandler(this.lbl_ExportFiles_MouseDown);
            base.AutoScaleDimensions        = new SizeF(6f, 13f);
            base.AutoScaleMode              = AutoScaleMode.Font;
            this.BackColor                  = Color.White;
            base.ClientSize                 = new Size(560, 390);
            base.Controls.Add(this.ExportPanel);
            base.Controls.Add(this.HeaderPanel);
            base.FormBorderStyle = FormBorderStyle.None;
            base.Name            = "ExportForm";
            base.StartPosition   = FormStartPosition.CenterScreen;
            this.Text            = "Form1";
            base.FormClosing    += new FormClosingEventHandler(this.ExportForm_FormClosing);
            base.Load           += new EventHandler(this.ExportForm_Load);
            base.Paint          += new PaintEventHandler(this.ExportForm_Paint);
            this.ExportPanel.ResumeLayout(false);
            this.ExportPanel.PerformLayout();
            ((ISupportInitialize)this.picThumbnail).EndInit();
            this.HeaderPanel.ResumeLayout(false);
            this.HeaderPanel.PerformLayout();
            ((ISupportInitialize)this.pic).EndInit();
            base.ResumeLayout(false);
        }
示例#52
0
        /// <summary>
        /// Schedules an action to be executed after dueTime on the message loop associated with the control, using a Windows Forms Timer object.
        /// </summary>
        /// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
        /// <param name="state">State passed to the action to be executed.</param>
        /// <param name="action">Action to be executed.</param>
        /// <param name="dueTime">Relative time after which to execute the action.</param>
        /// <returns>The disposable object used to cancel the scheduled action (best effort).</returns>
        /// <exception cref="ArgumentNullException"><paramref name="action"/> is null.</exception>
        public override IDisposable Schedule <TState>(TState state, TimeSpan dueTime, Func <IScheduler, TState, IDisposable> action)
        {
            if (action == null)
            {
                throw new ArgumentNullException("action");
            }

            var dt = Scheduler.Normalize(dueTime);

            if (dt.Ticks == 0)
            {
                return(Schedule(state, action));
            }

            var createTimer = new Func <IScheduler, TState, IDisposable>((scheduler1, state1) =>
            {
                var d = new MultipleAssignmentDisposable();

                var timer = new System.Windows.Forms.Timer();

                timer.Tick += (s, e) =>
                {
                    var t = Interlocked.Exchange(ref timer, null);
                    if (t != null)
                    {
                        try
                        {
                            d.Disposable = action(scheduler1, state1);
                        }
                        finally
                        {
                            t.Stop();
                            action = null;
                        }
                    }
                };

                timer.Interval = (int)dt.TotalMilliseconds;
                timer.Start();

                d.Disposable = Disposable.Create(() =>
                {
                    var t = Interlocked.Exchange(ref timer, null);
                    if (t != null)
                    {
                        t.Stop();
                        action = (_, __) => Disposable.Empty;
                    }
                });

                return(d);
            });

            //
            // This check is critical. When creating and enabling a Timer object on another thread than
            // the UI thread, it won't fire.
            //
            if (_control.InvokeRequired)
            {
                return(Schedule(state, createTimer));
            }
            else
            {
                return(createTimer(this, state));
            }
        }
示例#53
0
 private void InitializeComponent()
 {
     this.components              = new Container();
     this.textBox1                = new TextBox();
     this.UnosServera             = new Button();
     this.UcitajKingsProxyServere = new Button();
     this.ProveraServeraIzBaze    = new Button();
     this.progressBar1            = new ProgressBar();
     this.backgroundWorker1       = new BackgroundWorker();
     this.timer1      = new System.Windows.Forms.Timer(this.components);
     this.label1      = new Label();
     this.KrajProvere = new System.Windows.Forms.Timer(this.components);
     this.label2      = new Label();
     this.label3      = new Label();
     base.SuspendLayout();
     this.textBox1.Location    = new Point(12, 0x76);
     this.textBox1.Multiline   = true;
     this.textBox1.Name        = "textBox1";
     this.textBox1.ScrollBars  = ScrollBars.Vertical;
     this.textBox1.Size        = new Size(0x337, 0x18b);
     this.textBox1.TabIndex    = 0;
     this.UnosServera.Location = new Point(12, 0x207);
     this.UnosServera.Name     = "UnosServera";
     this.UnosServera.Size     = new Size(0x337, 0x17);
     this.UnosServera.TabIndex = 1;
     this.UnosServera.Text     = "Unos servera";
     this.UnosServera.UseVisualStyleBackColor = true;
     this.UnosServera.Click += new EventHandler(this.UnosServera_Click);
     this.UcitajKingsProxyServere.Location = new Point(12, 0x59);
     this.UcitajKingsProxyServere.Name     = "UcitajKingsProxyServere";
     this.UcitajKingsProxyServere.Size     = new Size(0xb3, 0x17);
     this.UcitajKingsProxyServere.TabIndex = 2;
     this.UcitajKingsProxyServere.Text     = "Ucitaj kings proxy servere";
     this.UcitajKingsProxyServere.UseVisualStyleBackColor = true;
     this.UcitajKingsProxyServere.Click += new EventHandler(this.UcitajKingsProxyServere_Click);
     this.ProveraServeraIzBaze.Location  = new Point(0xc5, 0x2d);
     this.ProveraServeraIzBaze.Name      = "ProveraServeraIzBaze";
     this.ProveraServeraIzBaze.Size      = new Size(0xb3, 0x43);
     this.ProveraServeraIzBaze.TabIndex  = 3;
     this.ProveraServeraIzBaze.Text      = "Pokreni proveru servera iz baze";
     this.ProveraServeraIzBaze.UseVisualStyleBackColor = true;
     this.ProveraServeraIzBaze.Click += new EventHandler(this.ProveraServeraIzBaze_Click);
     this.progressBar1.Location       = new Point(13, 0x223);
     this.progressBar1.Name           = "progressBar1";
     this.progressBar1.Size           = new Size(0x336, 0x17);
     this.progressBar1.Step           = 1;
     this.progressBar1.TabIndex       = 4;
     this.backgroundWorker1.WorkerReportsProgress = true;
     this.backgroundWorker1.DoWork             += new DoWorkEventHandler(this.backgroundWorker1_DoWork);
     this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
     this.backgroundWorker1.ProgressChanged    += new ProgressChangedEventHandler(this.backgroundWorker1_ProgressChanged);
     this.timer1.Interval      = 300;
     this.timer1.Tick         += new EventHandler(this.timer1_Tick);
     this.label1.AutoSize      = true;
     this.label1.Location      = new Point(0x17e, 0x52);
     this.label1.Name          = "label1";
     this.label1.Size          = new Size(0x1f, 13);
     this.label1.TabIndex      = 5;
     this.label1.Text          = "OK - ";
     this.KrajProvere.Interval = 0x2710;
     this.KrajProvere.Tick    += new EventHandler(this.KrajProvere_Tick);
     this.label2.AutoSize      = true;
     this.label2.Location      = new Point(0x17e, 0x63);
     this.label2.Name          = "label2";
     this.label2.Size          = new Size(0x26, 13);
     this.label2.TabIndex      = 6;
     this.label2.Text          = "BAD - ";
     this.label3.AutoSize      = true;
     this.label3.Font          = new Font("Microsoft Sans Serif", 24f, FontStyle.Bold, GraphicsUnit.Point, 0);
     this.label3.Location      = new Point(0x17e, 0x2d);
     this.label3.Name          = "label3";
     this.label3.Size          = new Size(0x54, 0x25);
     this.label3.TabIndex      = 7;
     this.label3.Text          = "00%";
     base.AutoScaleDimensions  = new SizeF(6f, 13f);
     base.AutoScaleMode        = AutoScaleMode.Font;
     this.BackColor            = Color.White;
     base.ClientSize           = new Size(0x34f, 0x23f);
     base.Controls.Add(this.label3);
     base.Controls.Add(this.label2);
     base.Controls.Add(this.label1);
     base.Controls.Add(this.progressBar1);
     base.Controls.Add(this.ProveraServeraIzBaze);
     base.Controls.Add(this.UcitajKingsProxyServere);
     base.Controls.Add(this.UnosServera);
     base.Controls.Add(this.textBox1);
     base.FormBorderStyle = FormBorderStyle.FixedToolWindow;
     base.Name            = "ProveraProxyServera";
     base.StartPosition   = FormStartPosition.CenterScreen;
     this.Text            = "Provera proxy servera";
     base.ResumeLayout(false);
     base.PerformLayout();
 }
示例#54
0
        private void m_pToggleRun_Click(object sender, EventArgs e)
        {
            SaveSetting(m_pInDevices);
            SaveSetting(m_pOutDevices);
            //SaveSetting(m_pCodec);
            SaveSetting(m_pInDevices);
            SaveSetting(m_pLoacalIP);
            SaveSetting(m_pLocalPort);
            {
                if (m_IsRunning)
                {
                    m_IsRunning     = false;
                    m_IsSendingTest = false;

                    m_pUdpServer.Dispose();
                    m_pUdpServer = null;

                    m_pWaveOut.Dispose();
                    m_pWaveOut = null;

                    if (m_pRecordStream != null)
                    {
                        m_pRecordStream.Dispose();
                        m_pRecordStream = null;
                    }

                    m_pTimer.Dispose();
                    m_pTimer = null;

                    m_pInDevices.Enabled  = true;
                    m_pOutDevices.Enabled = true;
                    //m_pCodec.Enabled = true;
                    m_pToggleRun.Text = "Start";
                    //m_pRecord.Enabled = true;
                    //m_pRecordFile.Enabled = true;
                    //m_pRecordFileBrowse.Enabled = true;
                    m_pRemoteIP.Enabled   = false;
                    m_pRemotePort.Enabled = false;
                    m_pToggleMic.Text     = "Start";
                    m_pToggleMic.Enabled  = false;
                    //m_pSendTestSound.Enabled = false;
                    //m_pSendTestSound.Text = "Start";
                    //m_pPlayTestSound.Enabled = false;
                    //m_pPlayTestSound.Text = "Play";
                }
                else
                {
                    if (m_pOutDevices.SelectedIndex == -1)
                    {
                        MessageBox.Show(this, "Please select output device !", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    //if (m_pRecord.Checked && m_pRecordFile.Text == "")
                    //{
                    //    MessageBox.Show(this, "Please specify record file !", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    //    return;
                    //}

                    //if (m_pRecord.Checked)
                    //{
                    //    m_pRecordStream = File.Create(m_pRecordFile.Text);
                    //}

                    m_IsRunning = true;

                    //m_Codec = m_pCodec.SelectedIndex;
                    m_Codec = 0;

                    m_pWaveOut = new WaveOut(WaveOut.Devices[m_pOutDevices.SelectedIndex], 8000, 16, 1);

                    m_pUdpServer                 = new UdpServer();
                    m_pUdpServer.Bindings        = new IPEndPoint[] { new IPEndPoint(IPAddress.Parse(m_pLoacalIP.Text), (int)m_pLocalPort.Value) };
                    m_pUdpServer.PacketReceived += new PacketReceivedHandler(m_pUdpServer_PacketReceived);
                    m_pUdpServer.Start();

                    m_pTimer          = new System.Windows.Forms.Timer();
                    m_pTimer.Interval = 1000;
                    m_pTimer.Tick    += new EventHandler(m_pTimer_Tick);
                    m_pTimer.Enabled  = true;

                    m_pInDevices.Enabled  = false;
                    m_pOutDevices.Enabled = false;
                    //m_pCodec.Enabled = false;
                    m_pToggleRun.Text = "Stop";
                    //m_pRecord.Enabled = false;
                    //m_pRecordFile.Enabled = false;
                    //m_pRecordFileBrowse.Enabled = false;
                    m_pRemoteIP.Enabled   = true;
                    m_pRemotePort.Enabled = true;
                    m_pToggleMic.Enabled  = true;
                    //m_pSendTestSound.Enabled = true;
                    //m_pSendTestSound.Text = "Start";
                    //m_pPlayTestSound.Enabled = true;
                    //m_pPlayTestSound.Text = "Play";
                }
            }
        }
示例#55
0
        private void bbi_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                BarButtonItem v = (BarButtonItem)e.Item;
                if (v == bbiLogin)
                {
                    wfLogin login = new wfLogin();

                    //第四步  初始化事件
                    login.setFormTextVaule += Login_setFormTextVaule;

                    if (login.ShowDialog() == DialogResult.OK)
                    {
                        Logout();
                        bbiUser.Caption = wfLogin.userName;
                        //Program.permissionManager.ActivePermission = wfLogin.permission;
                        UserName = bbiUser.Caption;


                        MessageBox.Show(UserName);
                        // Program.permissionManager.ApplyPermission(this);
                        //定时器初始化
                        timerLogout = new System.Windows.Forms.Timer();
                        this.timerLogout.Interval = 60 * 1000;
                        this.timerLogout.Tick    += new System.EventHandler(OverTimeLogout);
                        timerLogout.Enabled       = true;
                        Program.IdleStart         = new TimeSpan(DateTime.Now.Ticks);

                        if (bbiUser.Caption != Program.infoResource.GetLocalizedString(InfoId.Tourist))
                        {
                            bbiLogout2.Visibility = BarItemVisibility.Always;
                        }
                    }

                    return;
                }
                if (v == bbiModifyPassword)
                {
                    if (bbiUser.Caption == Program.infoResource.GetLocalizedString(InfoId.Tourist))
                    {
                        XtraMessageBox.Show(Program.infoResource.GetLocalizedString(language.InfoId.LoginFirst));
                        return;
                    }
                    if (bbiUser.Caption == SuperManager)
                    {
                        XtraMessageBox.Show(Program.infoResource.GetLocalizedString(language.InfoId.NoPowerChangePwd));
                        return;
                    }
                    else
                    {
                        wfModifyPassword from = new wfModifyPassword(bbiUser.Caption);
                        from.ShowDialog();
                    }
                }
                if (v == bbiLogout)
                {
                    bbiUser.Caption = "游客";


                    menuSystem.Visible  = false;
                    menuStation.Visible = false;
                    menuHelp.Visible    = false;
                    frmMain frm = new frmMain();
                    frm.bbiDeviceManager.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    frm.bbiDebugging.Visibility     = DevExpress.XtraBars.BarItemVisibility.Never;
                    frm.bbiDataCount.Visibility     = DevExpress.XtraBars.BarItemVisibility.Never;


                    Logout();
                    //bbiLogout.Visibility = BarItemVisibility.Never;
                }
                //if (v == bbiHelp)
                //{
                //    if (String.IsNullOrEmpty(_helpChmPath)||!File.Exists(_helpChmPath))
                //    {
                //        XtraMessageBox.Show(Program.infoResource.GetLocalizedString(language.InfoId.NoHelpChm));
                //        return;
                //    }
                //    Help.ShowHelpIndex(this, _helpChmPath);
                //}
                if (v.Tag != null)
                {
                    if (activeBarItem != null && activeBarItem.ImageOptions.DisabledLargeImage != null)
                    {
                        activeBarItem.ImageOptions.LargeImage = activeBarItem.ImageOptions.DisabledLargeImage;
                        activeBarItem.ImageOptions.Image      = activeBarItem.ImageOptions.LargeImage;
                    }

                    activeBarItem = v;
                    if (v.ImageOptions.DisabledImage != null)
                    {
                        v.ImageOptions.LargeImage = v.ImageOptions.DisabledImage;
                        v.ImageOptions.Image      = v.ImageOptions.LargeImage;
                    }

                    NavBarItemLink link = new NavBarItemLink(new NavBarItem(v.Name));
                    link.Item.Tag = v.Tag;
                    modulesNavigator.ChangeSelectedItem(link, null);
                }
            }
            catch (Exception ex)
            {
                //    ErrorLog.Error(ex.StackTrace.ToString());
            }
        }
示例#56
0
        public MainForm()
        {
            this.Text            = "Blotto Beats";
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.MouseDown      += this.mouseDown;
            this.MouseUp        += this.mouseUp;
            this.MouseWheel     += this.mouseWheel;
            this.Paint          += this.paint;
            this.DoubleBuffered  = true;
            this.BackColor       = Color.Turquoise;
            this.TransparencyKey = Color.Turquoise;
            this.TopMost         = Properties.Settings.Default.alwaysOnTop;

            size            = 80;
            buttons         = new List <Button>();
            settings        = new List <Setting>();
            dragging        = false;
            playing         = false;
            progress        = 0;
            score           = 0;
            settingsDropped = false;
            songLen         = 0;
            songPos         = -1;
            backlog         = new List <SongParameters>();
            genres          = new String[] { null, "Generic", "Classical", "Twelve-tone", "Jazz", "4-Chord Pop/Rock", null };
            redditSongs     = new List <SongParameters> [genres.Length];
            redditThreads   = new Thread[genres.Length];
            for (int i = 0; i < redditSongs.Length; i++)
            {
                redditSongs[i]   = new List <SongParameters>();
                redditThreads[i] = new Thread(() => refreshReddit(i));
            }
            generator = new Generator();
            server    = new BBServerConnection(Properties.Settings.Default.lastIP, 3000);
            player    = new MediaPlayer.MediaPlayer();
            curGenre  = 0;

            timer          = new System.Windows.Forms.Timer();
            timer.Interval = 10;
            timer.Tick    += this.tick;

            origPlayImg        = new Bitmap("images/play.png");
            origPauseImg       = new Bitmap("images/pause.png");
            origBackImg        = new Bitmap("images/back.png");
            origNextImg        = new Bitmap("images/next.png");
            origUpvoteImg      = new Bitmap("images/upvote.png");
            origDownvoteImg    = new Bitmap("images/downvote.png");
            origRedditImg      = new Bitmap("images/reddit.png");
            origSettingsImg    = new Bitmap("images/settings.png");
            origAdvSettingsImg = new Bitmap("images/advsettings.png");
            origExportImg      = new Bitmap("images/export.png");

            lightColor             = new SolidBrush(Properties.Settings.Default.lightColor);
            medColor               = new SolidBrush(Properties.Settings.Default.medColor);
            darkColor              = new SolidBrush(Properties.Settings.Default.darkColor);
            sliderColor            = new SolidBrush(Properties.Settings.Default.sliderColor);
            downvoteColor          = new SolidBrush(Properties.Settings.Default.downvoteColor);
            upvoteColor            = new SolidBrush(Properties.Settings.Default.upvoteColor);
            textColor              = new SolidBrush(Properties.Settings.Default.textColor);
            lightInline            = new Pen(lightColor);
            lightInline.Alignment  = System.Drawing.Drawing2D.PenAlignment.Inset;
            lightOutline           = new Pen(lightColor);
            lightOutline.Alignment = System.Drawing.Drawing2D.PenAlignment.Outset;

            genre = new DropDownSetting(0, "Genre", this, new string[] { "Generic", "Classical", "Twelve-tone", "Jazz", "4-Chord Pop/Rock" }, size);
            tempo = new TextBoxSetting(1, "Tempo", this, 60, 200, size);
            seed  = new TextBoxSetting(2, "Seed", this, int.MinValue, int.MaxValue, size);
            settings.Add(genre);
            settings.Add(tempo);
            settings.Add(seed);

            foreach (Setting setting in settings)
            {
                setting.setVisible(settingsDropped);
            }

            initButtons();

            settingsForm = new AdvancedSettings(this);
            accountForm  = new AccountManagement(this);

            new Thread(() => startUp()).Start();
        }
示例#57
0
        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(formDisplay));

            this.panel_Border           = new Panel();
            this.panel_Panel            = new Panel();
            this.EdgeCorner4_pictureBox = new PictureBox();
            this.EdgeCorner3_pictureBox = new PictureBox();
            this.EdgeCorner2_pictureBox = new PictureBox();
            this.EdgeCorner1_pictureBox = new PictureBox();
            this.edgeLeft_pictureBox    = new PictureBox();
            this.edgeRight_pictureBox   = new PictureBox();
            this.edgeBottom_pictureBox  = new PictureBox();
            this.Panel_Item             = new Panel();
            this.edgeTop_pictureBox     = new PictureBox();
            this.toolStrip1             = new ToolStrip();
            this.toolStripButton1       = new ToolStripButton();
            this.toolStripButton2       = new ToolStripButton();
            this.toolStripButton3       = new ToolStripButton();
            this.close_ToolStripButton  = new ToolStripButton();
            this.timer_ItemEdge         = new System.Windows.Forms.Timer(this.components);
            this.panel_Border.SuspendLayout();
            this.panel_Panel.SuspendLayout();
            ((ISupportInitialize)this.EdgeCorner4_pictureBox).BeginInit();
            ((ISupportInitialize)this.EdgeCorner3_pictureBox).BeginInit();
            ((ISupportInitialize)this.EdgeCorner2_pictureBox).BeginInit();
            ((ISupportInitialize)this.EdgeCorner1_pictureBox).BeginInit();
            ((ISupportInitialize)this.edgeLeft_pictureBox).BeginInit();
            ((ISupportInitialize)this.edgeRight_pictureBox).BeginInit();
            ((ISupportInitialize)this.edgeBottom_pictureBox).BeginInit();
            ((ISupportInitialize)this.edgeTop_pictureBox).BeginInit();
            this.toolStrip1.SuspendLayout();
            base.SuspendLayout();
            this.panel_Border.Anchor     = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
            this.panel_Border.AutoScroll = true;
            this.panel_Border.BackColor  = System.Drawing.Color.FromArgb(100, 30, 0);
            this.panel_Border.Controls.Add(this.panel_Panel);
            this.panel_Border.Location  = new System.Drawing.Point(0, 0);
            this.panel_Border.Name      = "panel_Border";
            this.panel_Border.Size      = new System.Drawing.Size(510, 210);
            this.panel_Border.TabIndex  = 0;
            this.panel_Panel.AutoScroll = true;
            this.panel_Panel.BackColor  = System.Drawing.Color.Black;
            this.panel_Panel.Controls.Add(this.EdgeCorner4_pictureBox);
            this.panel_Panel.Controls.Add(this.EdgeCorner3_pictureBox);
            this.panel_Panel.Controls.Add(this.EdgeCorner2_pictureBox);
            this.panel_Panel.Controls.Add(this.EdgeCorner1_pictureBox);
            this.panel_Panel.Controls.Add(this.edgeLeft_pictureBox);
            this.panel_Panel.Controls.Add(this.edgeRight_pictureBox);
            this.panel_Panel.Controls.Add(this.edgeBottom_pictureBox);
            this.panel_Panel.Controls.Add(this.Panel_Item);
            this.panel_Panel.Controls.Add(this.edgeTop_pictureBox);
            this.panel_Panel.Location            = new System.Drawing.Point(5, 5);
            this.panel_Panel.Name                = "panel_Panel";
            this.panel_Panel.Size                = new System.Drawing.Size(500, 199);
            this.panel_Panel.TabIndex            = 2;
            this.EdgeCorner4_pictureBox.Location = new System.Drawing.Point(431, 147);
            this.EdgeCorner4_pictureBox.Name     = "EdgeCorner4_pictureBox";
            this.EdgeCorner4_pictureBox.Size     = new System.Drawing.Size(32, 26);
            this.EdgeCorner4_pictureBox.TabIndex = 8;
            this.EdgeCorner4_pictureBox.TabStop  = false;
            this.EdgeCorner3_pictureBox.Location = new System.Drawing.Point(383, 147);
            this.EdgeCorner3_pictureBox.Name     = "EdgeCorner3_pictureBox";
            this.EdgeCorner3_pictureBox.Size     = new System.Drawing.Size(32, 26);
            this.EdgeCorner3_pictureBox.TabIndex = 7;
            this.EdgeCorner3_pictureBox.TabStop  = false;
            this.EdgeCorner2_pictureBox.Location = new System.Drawing.Point(431, 98);
            this.EdgeCorner2_pictureBox.Name     = "EdgeCorner2_pictureBox";
            this.EdgeCorner2_pictureBox.Size     = new System.Drawing.Size(32, 26);
            this.EdgeCorner2_pictureBox.TabIndex = 6;
            this.EdgeCorner2_pictureBox.TabStop  = false;
            this.EdgeCorner1_pictureBox.Location = new System.Drawing.Point(383, 98);
            this.EdgeCorner1_pictureBox.Name     = "EdgeCorner1_pictureBox";
            this.EdgeCorner1_pictureBox.Size     = new System.Drawing.Size(32, 26);
            this.EdgeCorner1_pictureBox.TabIndex = 5;
            this.EdgeCorner1_pictureBox.TabStop  = false;
            this.edgeLeft_pictureBox.BackColor   = System.Drawing.Color.Transparent;
            this.edgeLeft_pictureBox.Location    = new System.Drawing.Point(7, 39);
            this.edgeLeft_pictureBox.Name        = "edgeLeft_pictureBox";
            this.edgeLeft_pictureBox.Size        = new System.Drawing.Size(10, 110);
            this.edgeLeft_pictureBox.TabIndex    = 2;
            this.edgeLeft_pictureBox.TabStop     = false;
            this.edgeRight_pictureBox.BackColor  = System.Drawing.Color.Transparent;
            this.edgeRight_pictureBox.Location   = new System.Drawing.Point(483, 27);
            this.edgeRight_pictureBox.Name       = "edgeRight_pictureBox";
            this.edgeRight_pictureBox.Size       = new System.Drawing.Size(10, 134);
            this.edgeRight_pictureBox.TabIndex   = 4;
            this.edgeRight_pictureBox.TabStop    = false;
            this.edgeBottom_pictureBox.BackColor = System.Drawing.Color.Transparent;
            this.edgeBottom_pictureBox.Location  = new System.Drawing.Point(142, 170);
            this.edgeBottom_pictureBox.Name      = "edgeBottom_pictureBox";
            this.edgeBottom_pictureBox.Size      = new System.Drawing.Size(178, 10);
            this.edgeBottom_pictureBox.TabIndex  = 3;
            this.edgeBottom_pictureBox.TabStop   = false;
            this.Panel_Item.BackColor            = System.Drawing.Color.DimGray;
            this.Panel_Item.Location             = new System.Drawing.Point(142, 39);
            this.Panel_Item.Name              = "Panel_Item";
            this.Panel_Item.Size              = new System.Drawing.Size(208, 93);
            this.Panel_Item.TabIndex          = 0;
            this.Panel_Item.Paint            += new PaintEventHandler(this.Panel_Item_Paint);
            this.edgeTop_pictureBox.BackColor = System.Drawing.Color.Transparent;
            this.edgeTop_pictureBox.Location  = new System.Drawing.Point(160, 7);
            this.edgeTop_pictureBox.Name      = "edgeTop_pictureBox";
            this.edgeTop_pictureBox.Size      = new System.Drawing.Size(178, 10);
            this.edgeTop_pictureBox.TabIndex  = 1;
            this.edgeTop_pictureBox.TabStop   = false;
            this.toolStrip1.Dock              = DockStyle.Bottom;
            this.toolStrip1.ImageScalingSize  = new System.Drawing.Size(24, 24);
            this.toolStrip1.Items.AddRange(new ToolStripItem[]
            {
                this.toolStripButton1,
                this.toolStripButton2,
                this.toolStripButton3,
                this.close_ToolStripButton
            });
            this.toolStrip1.Location                         = new System.Drawing.Point(0, 207);
            this.toolStrip1.Name                             = "toolStrip1";
            this.toolStrip1.Size                             = new System.Drawing.Size(510, 31);
            this.toolStrip1.TabIndex                         = 1;
            this.toolStrip1.Text                             = "toolStrip1";
            this.toolStripButton1.DisplayStyle               = ToolStripItemDisplayStyle.Image;
            this.toolStripButton1.Image                      = (System.Drawing.Image)componentResourceManager.GetObject("toolStripButton1.Image");
            this.toolStripButton1.ImageTransparentColor      = System.Drawing.Color.Magenta;
            this.toolStripButton1.Name                       = "toolStripButton1";
            this.toolStripButton1.Size                       = new System.Drawing.Size(28, 28);
            this.toolStripButton1.Text                       = "放大";
            this.toolStripButton1.Click                     += new EventHandler(this.toolStripButton1_Click);
            this.toolStripButton2.DisplayStyle               = ToolStripItemDisplayStyle.Image;
            this.toolStripButton2.Image                      = (System.Drawing.Image)componentResourceManager.GetObject("toolStripButton2.Image");
            this.toolStripButton2.ImageTransparentColor      = System.Drawing.Color.Magenta;
            this.toolStripButton2.Name                       = "toolStripButton2";
            this.toolStripButton2.Size                       = new System.Drawing.Size(28, 28);
            this.toolStripButton2.Text                       = "复原";
            this.toolStripButton2.Click                     += new EventHandler(this.toolStripButton2_Click);
            this.toolStripButton3.DisplayStyle               = ToolStripItemDisplayStyle.Image;
            this.toolStripButton3.Image                      = (System.Drawing.Image)componentResourceManager.GetObject("toolStripButton3.Image");
            this.toolStripButton3.ImageTransparentColor      = System.Drawing.Color.Magenta;
            this.toolStripButton3.Name                       = "toolStripButton3";
            this.toolStripButton3.Size                       = new System.Drawing.Size(28, 28);
            this.toolStripButton3.Text                       = "缩小";
            this.toolStripButton3.Click                     += new EventHandler(this.toolStripButton3_Click);
            this.close_ToolStripButton.DisplayStyle          = ToolStripItemDisplayStyle.Image;
            this.close_ToolStripButton.Image                 = (System.Drawing.Image)componentResourceManager.GetObject("close_ToolStripButton.Image");
            this.close_ToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.close_ToolStripButton.Name                  = "close_ToolStripButton";
            this.close_ToolStripButton.Size                  = new System.Drawing.Size(28, 28);
            this.close_ToolStripButton.Text                  = "关闭";
            this.close_ToolStripButton.Click                += new EventHandler(this.close_ToolStripButton_Click);
            this.timer_ItemEdge.Interval                     = 42;
            this.timer_ItemEdge.Tick                        += new EventHandler(this.timer_ItemEdge_Tick);
            base.AutoScaleDimensions                         = new System.Drawing.SizeF(6f, 12f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize    = new System.Drawing.Size(510, 238);
            base.Controls.Add(this.toolStrip1);
            base.Controls.Add(this.panel_Border);
            base.FormBorderStyle = FormBorderStyle.None;
            base.Name            = "formDisplay";
            base.StartPosition   = FormStartPosition.CenterScreen;
            this.Text            = "预览";
            base.Load           += new EventHandler(this.formDisplay_Load);
            base.FormClosing    += new FormClosingEventHandler(this.formDisplay_FormClosing);
            this.panel_Border.ResumeLayout(false);
            this.panel_Panel.ResumeLayout(false);
            ((ISupportInitialize)this.EdgeCorner4_pictureBox).EndInit();
            ((ISupportInitialize)this.EdgeCorner3_pictureBox).EndInit();
            ((ISupportInitialize)this.EdgeCorner2_pictureBox).EndInit();
            ((ISupportInitialize)this.EdgeCorner1_pictureBox).EndInit();
            ((ISupportInitialize)this.edgeLeft_pictureBox).EndInit();
            ((ISupportInitialize)this.edgeRight_pictureBox).EndInit();
            ((ISupportInitialize)this.edgeBottom_pictureBox).EndInit();
            ((ISupportInitialize)this.edgeTop_pictureBox).EndInit();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
        public void ShowRank()
        {
            this.Height = screenHeight;
            this.Width  = screenWidth;



            this.label_title.Visible       = false;
            this.webBrowser1.Visible       = false;
            this.panel1.Visible            = false;
            this.panel2.Visible            = false;
            this.pictureBox_header.Visible = true;

            List <Group> szGroup = Global.getGroupRanking();

            for (int i = 0; i < 10 && i < szGroup.Count(); i++)
            {
                szRandDash[i].Font      = new System.Drawing.Font("黑体", 10F);
                szRandDash[i].ForeColor = System.Drawing.Color.LimeGreen;

                if (i < 3)
                {
                    szRandNumber[i].Text    = "NO." + (i + 1);
                    szRandGroupname[i].Text = " " + szGroup[i].name + "组";
                    szRandPoint[i].Text     = szGroup[i].point + "分";

                    szRandGroupname[i].Image     = global::RueHelper.Properties.Resources.bg_top3;
                    szRandGroupname[i].TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

                    szRandNumber[i].Left    = (int)(screenWidth * 0.4) / 10;
                    szRandGroupname[i].Left = (int)(screenWidth * 1.75) / 10;
                    szRandDash[i].Left      = (int)(screenWidth * 3) / 10;
                    szRandPoint[i].Left     = (int)(screenWidth * 3.6) / 10;

                    pictureBox_top1.Left = (int)(screenWidth * 1.5) / 10;
                    pictureBox_top2.Left = (int)(screenWidth * 1.5) / 10;
                    pictureBox_top3.Left = (int)(screenWidth * 1.5) / 10;


                    int topL = (int)(screenHeight * (1.8 + 3 * i)) / 10;
                    szRandNumber[i].Top    = topL;
                    szRandGroupname[i].Top = topL;
                    szRandPoint[i].Top     = topL - 8;

                    //----Font & Color----
                    szRandNumber[i].Font    = new System.Drawing.Font("微软雅黑", 30F);//微软雅黑
                    szRandGroupname[i].Font = new System.Drawing.Font("微软雅黑", 30F);
                    szRandPoint[i].Font     = new System.Drawing.Font("微软雅黑", 38F);

                    szRandNumber[i].ForeColor    = System.Drawing.Color.Black;
                    szRandGroupname[i].ForeColor = System.Drawing.Color.LimeGreen;
                    szRandPoint[i].ForeColor     = System.Drawing.Color.LimeGreen;

                    szRandNumber[i].Visible    = true;
                    szRandGroupname[i].Visible = true;
                    szRandPoint[i].Visible     = true;


                    if (screenWidth > 1024)
                    {
                        szRandDash[i].Text      = "---------";
                        szRandDash[i].Top       = topL + 18;
                        szRandDash[i].TextAlign = System.Drawing.ContentAlignment.BottomCenter;
                        szRandDash[i].Visible   = true;
                    }
                    if (i == 0)
                    {
                        pictureBox_top1.Top     = szRandGroupname[0].Top - 10;
                        pictureBox_top1.Visible = true;
                    }
                    else if (i == 1)
                    {
                        pictureBox_top2.Top     = szRandGroupname[1].Top - 10;
                        pictureBox_top2.Visible = true;
                    }
                    else
                    {
                        pictureBox_top3.Top     = szRandGroupname[2].Top - 10;
                        pictureBox_top3.Visible = true;
                    }
                }
                else
                {
                    szRandNumber[i].Text    = "NO." + (i + 1);
                    szRandGroupname[i].Text = szGroup[i].name + "组";
                    szRandPoint[i].Text     = szGroup[i].point + "分";
                    if (screenWidth > 1024)
                    {
                        szRandDash[i].Text = "  --------------------------  ";
                    }
                    else
                    {
                        szRandDash[i].Text = "  -------------------  ";
                    }
                    szRandNumber[i].Left    = (int)(screenWidth * 5.5) / 10;
                    szRandGroupname[i].Left = (int)(screenWidth * 6.5) / 10;
                    szRandDash[i].Left      = (int)(screenWidth * 7.2) / 10;
                    szRandPoint[i].Left     = (int)(screenWidth * 8.8) / 10;

                    int topR = (int)(screenHeight * (1.5 + 1.1 * (i - 3))) / 10;
                    szRandNumber[i].Top    = topR;
                    szRandGroupname[i].Top = topR;
                    szRandPoint[i].Top     = topR;
                    szRandDash[i].Top      = topR + 8;

                    //----Font & Color----
                    szRandNumber[i].Font    = new System.Drawing.Font("微软雅黑", 22F);
                    szRandGroupname[i].Font = new System.Drawing.Font("微软雅黑", 22F);
                    szRandPoint[i].Font     = new System.Drawing.Font("微软雅黑", 22F);

                    szRandNumber[i].ForeColor    = System.Drawing.Color.Black;
                    szRandGroupname[i].ForeColor = System.Drawing.Color.Black;
                    szRandPoint[i].ForeColor     = System.Drawing.Color.Black;

                    szRandDash[i].TextAlign  = System.Drawing.ContentAlignment.BottomCenter;
                    szRandPoint[i].TextAlign = System.Drawing.ContentAlignment.MiddleRight;

                    szRandNumber[i].Visible    = true;
                    szRandGroupname[i].Visible = true;
                    szRandPoint[i].Visible     = true;
                    szRandDash[i].Visible      = true;
                }

                szRandGroupname[i].BringToFront();
            }

            //3秒显示,自动隐藏
            this.Show();
            this.BringToFront();

            System.Windows.Forms.Timer t = new System.Windows.Forms.Timer();
            t.Interval = 30000;
            t.Tick    += new EventHandler(t_Hide);
            t.Start();
        }
示例#59
0
 private void InitializeComponent()
 {
     this.components      = new System.ComponentModel.Container();
     this.closeButton     = new System.Windows.Forms.Button();
     this.titleLabel      = new System.Windows.Forms.Label();
     this.nameLabel       = new System.Windows.Forms.Label();
     this.ipLabel         = new System.Windows.Forms.Label();
     this.macLabel        = new System.Windows.Forms.Label();
     this.descLabel       = new System.Windows.Forms.Label();
     this.descBox         = new System.Windows.Forms.TextBox();
     this.infoUpdateTimer = new System.Windows.Forms.Timer(this.components);
     this.pingStatusLabel = new System.Windows.Forms.Label();
     this.arpStatusLabel  = new System.Windows.Forms.Label();
     this.nameBox         = new System.Windows.Forms.TextBox();
     this.ipBox           = new System.Windows.Forms.TextBox();
     this.macBox          = new System.Windows.Forms.TextBox();
     this.pingStatusBox   = new System.Windows.Forms.TextBox();
     this.arpStatusBox    = new System.Windows.Forms.TextBox();
     this.lastUpdateBox   = new System.Windows.Forms.TextBox();
     this.lastUpdateLabel = new System.Windows.Forms.Label();
     this.graphLabel      = new System.Windows.Forms.Label();
     this.uptimeBar       = new System.Windows.Forms.PictureBox();
     ((System.ComponentModel.ISupportInitialize)(this.uptimeBar)).BeginInit();
     this.SuspendLayout();
     //
     // closeButton
     //
     this.closeButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.closeButton.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.closeButton.Location  = new System.Drawing.Point(603, 12);
     this.closeButton.Name      = "closeButton";
     this.closeButton.Size      = new System.Drawing.Size(25, 25);
     this.closeButton.TabIndex  = 4;
     this.closeButton.Text      = "X";
     this.closeButton.UseVisualStyleBackColor = true;
     this.closeButton.Click += new System.EventHandler(this.onClose);
     //
     // titleLabel
     //
     this.titleLabel.AutoSize = true;
     this.titleLabel.Font     = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.titleLabel.Location = new System.Drawing.Point(12, 13);
     this.titleLabel.Name     = "titleLabel";
     this.titleLabel.Size     = new System.Drawing.Size(160, 20);
     this.titleLabel.TabIndex = 5;
     this.titleLabel.Text     = "Device Information";
     //
     // nameLabel
     //
     this.nameLabel.AutoSize = true;
     this.nameLabel.Location = new System.Drawing.Point(13, 48);
     this.nameLabel.Name     = "nameLabel";
     this.nameLabel.Size     = new System.Drawing.Size(78, 13);
     this.nameLabel.TabIndex = 6;
     this.nameLabel.Text     = "Device Name: ";
     //
     // ipLabel
     //
     this.ipLabel.AutoSize = true;
     this.ipLabel.Location = new System.Drawing.Point(13, 70);
     this.ipLabel.Name     = "ipLabel";
     this.ipLabel.Size     = new System.Drawing.Size(60, 13);
     this.ipLabel.TabIndex = 7;
     this.ipLabel.Text     = "Device IP: ";
     //
     // macLabel
     //
     this.macLabel.AutoSize = true;
     this.macLabel.Location = new System.Drawing.Point(13, 91);
     this.macLabel.Name     = "macLabel";
     this.macLabel.Size     = new System.Drawing.Size(73, 13);
     this.macLabel.TabIndex = 8;
     this.macLabel.Text     = "Device MAC: ";
     //
     // descLabel
     //
     this.descLabel.AutoSize = true;
     this.descLabel.Location = new System.Drawing.Point(13, 131);
     this.descLabel.Name     = "descLabel";
     this.descLabel.Size     = new System.Drawing.Size(63, 13);
     this.descLabel.TabIndex = 9;
     this.descLabel.Text     = "Description:";
     //
     // descBox
     //
     this.descBox.BackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
     this.descBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.descBox.ForeColor   = System.Drawing.Color.White;
     this.descBox.Location    = new System.Drawing.Point(16, 147);
     this.descBox.Multiline   = true;
     this.descBox.Name        = "descBox";
     this.descBox.ReadOnly    = true;
     this.descBox.Size        = new System.Drawing.Size(612, 130);
     this.descBox.TabIndex    = 10;
     //
     // infoUpdateTimer
     //
     this.infoUpdateTimer.Tick += new System.EventHandler(this.onUpdateTick);
     //
     // pingStatusLabel
     //
     this.pingStatusLabel.AutoSize = true;
     this.pingStatusLabel.Location = new System.Drawing.Point(13, 297);
     this.pingStatusLabel.Name     = "pingStatusLabel";
     this.pingStatusLabel.Size     = new System.Drawing.Size(87, 13);
     this.pingStatusLabel.TabIndex = 11;
     this.pingStatusLabel.Text     = "Last Ping Status:";
     //
     // arpStatusLabel
     //
     this.arpStatusLabel.AutoSize = true;
     this.arpStatusLabel.Location = new System.Drawing.Point(13, 325);
     this.arpStatusLabel.Name     = "arpStatusLabel";
     this.arpStatusLabel.Size     = new System.Drawing.Size(88, 13);
     this.arpStatusLabel.TabIndex = 12;
     this.arpStatusLabel.Text     = "Last ARP Status:";
     //
     // nameBox
     //
     this.nameBox.BackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
     this.nameBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.nameBox.ForeColor   = System.Drawing.Color.White;
     this.nameBox.Location    = new System.Drawing.Point(97, 46);
     this.nameBox.Name        = "nameBox";
     this.nameBox.ReadOnly    = true;
     this.nameBox.Size        = new System.Drawing.Size(531, 20);
     this.nameBox.TabIndex    = 13;
     //
     // ipBox
     //
     this.ipBox.BackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
     this.ipBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.ipBox.ForeColor   = System.Drawing.Color.White;
     this.ipBox.Location    = new System.Drawing.Point(97, 68);
     this.ipBox.Name        = "ipBox";
     this.ipBox.ReadOnly    = true;
     this.ipBox.Size        = new System.Drawing.Size(531, 20);
     this.ipBox.TabIndex    = 14;
     //
     // macBox
     //
     this.macBox.BackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
     this.macBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.macBox.ForeColor   = System.Drawing.Color.White;
     this.macBox.Location    = new System.Drawing.Point(97, 89);
     this.macBox.Name        = "macBox";
     this.macBox.ReadOnly    = true;
     this.macBox.Size        = new System.Drawing.Size(531, 20);
     this.macBox.TabIndex    = 15;
     //
     // pingStatusBox
     //
     this.pingStatusBox.BackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
     this.pingStatusBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.pingStatusBox.ForeColor   = System.Drawing.Color.White;
     this.pingStatusBox.Location    = new System.Drawing.Point(137, 295);
     this.pingStatusBox.Name        = "pingStatusBox";
     this.pingStatusBox.ReadOnly    = true;
     this.pingStatusBox.Size        = new System.Drawing.Size(491, 20);
     this.pingStatusBox.TabIndex    = 16;
     //
     // arpStatusBox
     //
     this.arpStatusBox.BackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
     this.arpStatusBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.arpStatusBox.ForeColor   = System.Drawing.Color.White;
     this.arpStatusBox.Location    = new System.Drawing.Point(137, 323);
     this.arpStatusBox.Name        = "arpStatusBox";
     this.arpStatusBox.ReadOnly    = true;
     this.arpStatusBox.Size        = new System.Drawing.Size(491, 20);
     this.arpStatusBox.TabIndex    = 17;
     //
     // lastUpdateBox
     //
     this.lastUpdateBox.BackColor   = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
     this.lastUpdateBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.lastUpdateBox.ForeColor   = System.Drawing.Color.White;
     this.lastUpdateBox.Location    = new System.Drawing.Point(137, 352);
     this.lastUpdateBox.Name        = "lastUpdateBox";
     this.lastUpdateBox.ReadOnly    = true;
     this.lastUpdateBox.Size        = new System.Drawing.Size(491, 20);
     this.lastUpdateBox.TabIndex    = 18;
     //
     // lastUpdateLabel
     //
     this.lastUpdateLabel.AutoSize = true;
     this.lastUpdateLabel.Location = new System.Drawing.Point(12, 354);
     this.lastUpdateLabel.Name     = "lastUpdateLabel";
     this.lastUpdateLabel.Size     = new System.Drawing.Size(119, 13);
     this.lastUpdateLabel.TabIndex = 19;
     this.lastUpdateLabel.Text     = "Last successful update:";
     //
     // graphLabel
     //
     this.graphLabel.AutoSize = true;
     this.graphLabel.Location = new System.Drawing.Point(13, 379);
     this.graphLabel.Name     = "graphLabel";
     this.graphLabel.Size     = new System.Drawing.Size(93, 13);
     this.graphLabel.TabIndex = 20;
     this.graphLabel.Text     = "Visualized Uptime:";
     //
     // uptimeBar
     //
     this.uptimeBar.Location = new System.Drawing.Point(16, 408);
     this.uptimeBar.Name     = "uptimeBar";
     this.uptimeBar.Size     = new System.Drawing.Size(612, 42);
     this.uptimeBar.TabIndex = 21;
     this.uptimeBar.TabStop  = false;
     //
     // DeviceInfoForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor           = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
     this.ClientSize          = new System.Drawing.Size(640, 480);
     this.Controls.Add(this.uptimeBar);
     this.Controls.Add(this.graphLabel);
     this.Controls.Add(this.lastUpdateLabel);
     this.Controls.Add(this.lastUpdateBox);
     this.Controls.Add(this.arpStatusBox);
     this.Controls.Add(this.pingStatusBox);
     this.Controls.Add(this.macBox);
     this.Controls.Add(this.ipBox);
     this.Controls.Add(this.nameBox);
     this.Controls.Add(this.arpStatusLabel);
     this.Controls.Add(this.pingStatusLabel);
     this.Controls.Add(this.descBox);
     this.Controls.Add(this.descLabel);
     this.Controls.Add(this.macLabel);
     this.Controls.Add(this.ipLabel);
     this.Controls.Add(this.nameLabel);
     this.Controls.Add(this.titleLabel);
     this.Controls.Add(this.closeButton);
     this.ForeColor       = System.Drawing.Color.White;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "DeviceInfoForm";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text            = "Device Info";
     this.Load           += new System.EventHandler(this.onLoad);
     this.Shown          += new System.EventHandler(this.onShow);
     ((System.ComponentModel.ISupportInitialize)(this.uptimeBar)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#60
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(programManager));
     this.listView1               = new System.Windows.Forms.ListView();
     this.columnHeader1           = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.columnHeader2           = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.columnHeader3           = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.columnHeader4           = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.contextMenuStrip1       = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.reloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.imageList1              = new System.Windows.Forms.ImageList(this.components);
     this.timer1 = new System.Windows.Forms.Timer(this.components);
     this.contextMenuStrip1.SuspendLayout();
     this.SuspendLayout();
     //
     // listView1
     //
     this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
         this.columnHeader1,
         this.columnHeader2,
         this.columnHeader3,
         this.columnHeader4
     });
     this.listView1.ContextMenuStrip = this.contextMenuStrip1;
     this.listView1.FullRowSelect    = true;
     this.listView1.GridLines        = true;
     this.listView1.HideSelection    = false;
     this.listView1.Location         = new System.Drawing.Point(1, 0);
     this.listView1.MultiSelect      = false;
     this.listView1.Name             = "listView1";
     this.listView1.ShowGroups       = false;
     this.listView1.ShowItemToolTips = true;
     this.listView1.Size             = new System.Drawing.Size(631, 416);
     this.listView1.SmallImageList   = this.imageList1;
     this.listView1.TabIndex         = 3;
     this.listView1.UseCompatibleStateImageBehavior = false;
     this.listView1.View = System.Windows.Forms.View.Details;
     //
     // columnHeader1
     //
     this.columnHeader1.Text  = "Program Name";
     this.columnHeader1.Width = 187;
     //
     // columnHeader2
     //
     this.columnHeader2.Text  = "Publisher";
     this.columnHeader2.Width = 144;
     //
     // columnHeader3
     //
     this.columnHeader3.Text  = "Version";
     this.columnHeader3.Width = 81;
     //
     // columnHeader4
     //
     this.columnHeader4.Text  = "Uninstall String";
     this.columnHeader4.Width = 192;
     //
     // contextMenuStrip1
     //
     this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.reloadToolStripMenuItem
     });
     this.contextMenuStrip1.Name = "contextMenuStrip1";
     this.contextMenuStrip1.Size = new System.Drawing.Size(181, 48);
     //
     // reloadToolStripMenuItem
     //
     this.reloadToolStripMenuItem.Image  = ((System.Drawing.Image)(resources.GetObject("reloadToolStripMenuItem.Image")));
     this.reloadToolStripMenuItem.Name   = "reloadToolStripMenuItem";
     this.reloadToolStripMenuItem.Size   = new System.Drawing.Size(180, 22);
     this.reloadToolStripMenuItem.Text   = "Reload";
     this.reloadToolStripMenuItem.Click += new System.EventHandler(this.reloadToolStripMenuItem_Click);
     //
     // imageList1
     //
     this.imageList1.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
     this.imageList1.Images.SetKeyName(0, "install.png");
     //
     // timer1
     //
     this.timer1.Enabled  = true;
     this.timer1.Interval = 500;
     this.timer1.Tick    += new System.EventHandler(this.timer1_Tick);
     //
     // programManager
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(632, 415);
     this.Controls.Add(this.listView1);
     this.Icon          = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name          = "programManager";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "Program Manager";
     this.Load         += new System.EventHandler(this.programManager_Load);
     this.contextMenuStrip1.ResumeLayout(false);
     this.ResumeLayout(false);
 }