Exemplo n.º 1
0
 private void inversionControl_MouseDown(object sender, MouseEventArgs e)
 {
     if (OverPanel == null)
     {
         return;
     }
     OverPanel.Hide();
 }
Exemplo n.º 2
0
 private void settingsPanel_MouseDown(object sender, MouseEventArgs e)
 {
     if (OverPanel == null)
     {
         return;
     }
     OverPanel.Hide();
 }
Exemplo n.º 3
0
    private void Start()
    {
        PausePanel.SetActive(false);
        ClearPanel.SetActive(false);
        OverPanel.SetActive(false);

        gamePanelCanvasGroup = PausePanel.transform.parent.GetComponent <CanvasGroup>();
    }
Exemplo n.º 4
0
 private void exportbtn_Click(object sender, EventArgs e)
 {
     if (OverPanel != null)
     {
         OverPanel.Hide();
     }
     if (saveFileDialog1.ShowDialog() == DialogResult.OK)
     {
         inversionControl.SaveBitmap(saveFileDialog1.FileName);
     }
 }
Exemplo n.º 5
0
        private void showchart_Click(object sender, EventArgs e)
        {
            if (OverPanel != null)
            {
                OverPanel.Hide();
            }
            InversionsPerDay ipd = new InversionsPerDay();

            ipd.Dates = _datetimes;
            ipd.ShowDialog();
        }
Exemplo n.º 6
0
 private void loadBtn_Click(object sender, EventArgs e)
 {
     if (_loadingpanel.Visible)
     {
         OverPanel.Hide();
     }
     else
     {
         _loadingpanel.ArrowLocation = new Point(((Button)sender).Location.X + ((Button)sender).Width / 2, settingsPanel.Height);
         OverPanel = _loadingpanel;
     }
 }
Exemplo n.º 7
0
        private int _end;                   //ending index ...
        private void loadIntervalBtn_Click(object sender, EventArgs e)
        {
            OverPanel.Hide();

            _allxyz = Directory.GetFiles(openxyzfolderDialog.SelectedPath, "*.xyz").ToArray();

            string startdate;

            _start = -1;
            for (int i = 0; _start == -1; i++)
            {
                startdate = fromdtp.Value.AddDays(i).ToString("yyyy-MM-dd");
                _start    = Array.FindIndex(_allxyz, x => x.Contains(startdate));
            }

            string enddate;

            _end = -1;
            for (int i = 0; _end == -1; i++)
            {
                enddate = todtp.Value.AddDays(-i).ToString("yyyy-MM-dd");
                _end    = Array.FindLastIndex(_allxyz, x => x.Contains(enddate));
            }

            if (_end < _start)
            {
                MessageBox.Show("End date can't be smaller than start date");
            }

            _allxyz = _allxyz.SubArray(_start, _end - _start);
            string[] _dates = _allxyz.Select(Path.GetFileNameWithoutExtension).ToArray();
            _datetimes = new List <DateTime>();

            for (int i = 0; i < _dates.Length; i++)
            {
                _datetimes.Add(DateTime.ParseExact(_dates[i], "yyyy-MM-dd HH-mm-ss", null));
            }

            ModelBlocks = Helper.GetModelBlocksFromFile(_allxyz[0]);
            int errorfiles = Helper.GetResistivitiesFromFile(ModelBlocks, _allxyz, _datetimes);

            timechanger.Minimum          = 0;
            timechanger.Maximum          = _end - _start - 1 - errorfiles;
            inversionControl.Dates       = _datetimes.ToArray();
            inversionControl.ModelBlocks = ModelBlocks;
            inversionControl.RMSError    = Helper.GetRMSError(_allxyz);
            settingsBtn.Show();
            huepicker.Show();
            showchart.Show();
            cbxenable.Checked = false;
        }
Exemplo n.º 8
0
 private void settingsBtn_Click(object sender, EventArgs e)
 {
     if (_datepanel.Visible)
     {
         OverPanel.Hide();
     }
     else
     {
         lbldate.Text             = _datetimes[timechanger.Value].ToString("dd.MM.yyyy HH:mm:ss");
         lbldate.Location         = new Point(timechanger.Width / 2 - lbldate.Width / 2, lbldate.Location.Y);
         _datepanel.ArrowLocation = new Point(((Button)sender).Location.X + ((Button)sender).Width / 2, settingsPanel.Height);
         OverPanel = _datepanel;
     }
 }
Exemplo n.º 9
0
        private DateTimePicker todtp;   //datetimepicker "to"
        private void loadFolderBtn_Click(object sender, EventArgs e)
        {
            if (openxyzfolderDialog.ShowDialog() == DialogResult.OK)
            {
                _allxyz = Directory.GetFiles(openxyzfolderDialog.SelectedPath, "*.xyz").ToArray();
                DateTime start = DateTime.ParseExact(Path.GetFileNameWithoutExtension(_allxyz[0]), "yyyy-MM-dd HH-mm-ss", null);
                DateTime end   = DateTime.ParseExact(Path.GetFileNameWithoutExtension(_allxyz[_allxyz.Length - 1]), "yyyy-MM-dd HH-mm-ss", null);

                #region init_panel_stuff
                OverPanel.Controls.Remove(lblpath);
                lblpath.Text     = openxyzfolderDialog.SelectedPath;
                lblpath.Location = new Point(lblpath.Location.X - 10, 15);
                OverPanel.SuspendLayout();
                Button loadIntervalBtn = new Button();
                loadIntervalBtn.BackColor                  = SystemColors.ControlDark;
                loadIntervalBtn.BackgroundImage            = Properties.Resources.checkbox2;
                loadIntervalBtn.BackgroundImageLayout      = ImageLayout.Stretch;
                loadIntervalBtn.FlatAppearance.BorderColor = SystemColors.ControlDarkDark;
                loadIntervalBtn.FlatStyle                  = FlatStyle.Flat;
                loadIntervalBtn.Location = new Point(0, 44);
                loadIntervalBtn.Name     = "loadIntervalBtn";
                loadIntervalBtn.Size     = new Size(24, 24);
                loadIntervalBtn.TabIndex = 0;
                loadIntervalBtn.UseVisualStyleBackColor = false;
                loadIntervalBtn.Click += new EventHandler(this.loadIntervalBtn_Click);

                Label fromlbl = new Label();
                fromlbl.Width     = 27;
                fromlbl.Text      = "from";
                fromlbl.Location  = new Point(lblpath.Location.X, 50);
                fromlbl.ForeColor = SystemColors.ControlDark;

                fromdtp              = new DateTimePicker();
                fromdtp.Format       = DateTimePickerFormat.Custom;
                fromdtp.CustomFormat = "yyyy-MM-dd";
                fromdtp.Value        = start;
                fromdtp.MinDate      = start;
                fromdtp.MaxDate      = end;
                fromdtp.Size         = new Size(75, 30);
                fromdtp.Location     = new Point(fromlbl.Location.X + fromlbl.Width, 47);

                Label tolbl = new Label();
                tolbl.Width     = 15;
                tolbl.AutoSize  = true;
                tolbl.Text      = "to";
                tolbl.Location  = new Point(fromdtp.Location.X + fromdtp.Width, 50);
                tolbl.ForeColor = SystemColors.ControlDark;

                todtp              = new DateTimePicker();
                todtp.Format       = DateTimePickerFormat.Custom;
                todtp.CustomFormat = "yyyy-MM-dd";
                todtp.Value        = end;
                todtp.MinDate      = start;
                todtp.MaxDate      = end;
                todtp.Size         = new Size(75, 30);
                todtp.Location     = new Point(tolbl.Location.X + tolbl.Width, 47);

                OverPanel.Controls.Add(loadIntervalBtn);
                OverPanel.Controls.Add(fromlbl);
                OverPanel.Controls.Add(fromdtp);
                OverPanel.Controls.Add(tolbl);
                OverPanel.Controls.Add(todtp);
                OverPanel.ResumeLayout();
                OverPanel.Controls.Add(lblpath);
                #endregion
            }
        }
Exemplo n.º 10
0
 public void OpenOverPanel()
 {
     OverPanel.SetActive(true);
     StartCoroutine(PanelFadeIn());
 }
Exemplo n.º 11
0
Arquivo: View.cs Projeto: dqchess/Test
    public void GameOver(string level, string time, int number)
    {
        OverPanel panel = uiMng.PushPanel(UIPanelType.OverPanel) as OverPanel;

        panel.ShowRecod(level, time, number);
    }