Exemple #1
0
        //string destPath = (@"C:\Users\asutphin\Desktop\Copy_Temp");



        public Form1()
        {
            InitializeComponent();
            ToolTip textBoxTip = new ToolTip();

            //  ToolTip Tip = new ToolTip();
            //  ToolTip textBoxTip = new ToolTip();
            //  ToolTip textBoxTip = new ToolTip();
            textBoxTip.SetToolTip(this.textBox1, "All characters typed here will be used to search for files\n" +
                                  "with the search term anywhere in their name.\n" +
                                  "Ex: \"PERF\" will copy all of the following files: ADC_PERF1.txt, PERFORMANCE.csv, PERF_REAL_SPURS.");
            label2.Hide();
            labelFilesFound.Hide();
            Label4.Hide();
            progressBar1.Hide();

            if (checkBoxAllFolders.Checked)
            {
                textBoxFolderNameFilter.Clear();
                textBoxFolderNameFilter.ReadOnly = true;
            }
            else
            {
                textBoxFolderNameFilter.ReadOnly = false;
            }
        }
Exemple #2
0
        /// <summary>
        /// Sets up the user interface.
        /// </summary>
        private void SetupGUI()
        {
            lblobjecttoskin.Text       = ElementName;
            btnstretch.BackgroundImage = Properties.Resources.stretchbutton;
            btntile.BackgroundImage    = Properties.Resources.tilebutton;
            btncentre.BackgroundImage  = Properties.Resources.centrebutton;
            btnzoom.BackgroundImage    = Properties.Resources.zoombutton;
            switch (this.ImageLayout)
            {
            case ImageLayout.Stretch:
                btnstretch.BackgroundImage = Properties.Resources.stretchbuttonpressed;
                break;

            case ImageLayout.Tile:
                btntile.BackgroundImage = Properties.Resources.tilebuttonpressed;
                break;

            case ImageLayout.Center:
                btncentre.BackgroundImage = Properties.Resources.centrebuttonpressed;
                break;

            default:
                btnzoom.BackgroundImage = Properties.Resources.zoombuttonpressed;
                break;
            }
            if (ShowMouseImages == true)
            {
                txtmousedownfile.Show();
                txtmouseoverfile.Show();
                Label3.Show();
                Label4.Show();
                picmousedown.Show();
                picmouseover.Show();
                btnmousedownbrowse.Show();
                btnmouseoverbrowse.Show();
                this.Height = MOUSE_IMAGES_WINDOW_HEIGHT;
            }
            else
            {
                txtmousedownfile.Hide();
                txtmouseoverfile.Hide();
                Label3.Hide();
                Label4.Hide();
                picmousedown.Hide();
                picmouseover.Hide();
                btnmousedownbrowse.Hide();
                btnmouseoverbrowse.Hide();
                this.Height = IDLE_ONLY_WINDOW_HEIGHT;
            }
            picidle.BackgroundImage       = IdleImage;
            picidle.BackgroundImageLayout = this.ImageLayout;
            picmousedown.BackgroundImage  = MouseDownImage;
            picidle.BackgroundImageLayout = this.ImageLayout;
            picmouseover.BackgroundImage  = MouseOverImage;
            picidle.BackgroundImageLayout = this.ImageLayout;
            txtidlefile.Text      = idle_filename;
            txtmousedownfile.Text = mousedown_filename;
            txtmouseoverfile.Text = mouseover_filename;
        }
Exemple #3
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     ProgressBar1.Increment(1);
     if (ProgressBar1.Value == 100)
     {
         Label4.Show();
         timer1.Stop();
     }
     Label3.Text = ProgressBar1.Value + (" %");
 }
        protected override void OnDisappearing()
        {
            base.OnDisappearing();

            Label1.RemoveAllGestureRecognizers();
            Label2.RemoveAllGestureRecognizers();
            Label3.RemoveAllGestureRecognizers();
            Label4.RemoveAllGestureRecognizers();
            Label5.RemoveAllGestureRecognizers();
            Label6.RemoveAllGestureRecognizers();
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            birimlerstore.DataSource = BldSvc.birimal();
            birimlerstore.DataBind();

            grupstore.DataSource = BldSvc.grupal();
            grupstore.DataBind();

            if (AktifKullanici != null)
            {
                ximgCap.Hide();
                xtxtCap.Hide();
                KurumStore.DataSource = BldSvc.kurumno(AktifKullanici);
                KurumStore.DataBind();

                e_mail.Hide();
                Konu.Hide();
                tel.Hide();
                Label2.Hide();
                Label3.Hide();
                BasvuruNo.Hide();
            }
            else
            {
                Tarih.Hide();
                Kurumlar.Hide();
                basvuru.Hide();
                Label5.Hide();
                Label4.Hide();
                Sonuc.Hide();
                BasvuruNo.Hide();
            }

            var kurumId = GetKurumId();

            if (kurumId == 0)
            {
                // Response.Write("Olmaz öyle");
                return;
            }

            var kurum = BldSvc.GetKurumById(kurumId);

            if (kurum == null)
            {
                // Response.Write("Kurum null ");
                return;
            }

            lblKurumAdi.Text = kurum.Adi;

            // var user = (dto_kullanicilar)Session["kullanici"];
            //var kurumid = user.KurumId;
        }
 void FixGesturesUsingXaml()
 {
     //the following is only necessary until Xamarin give us a hook into this I've filed a bugzilla about it
     //https://bugzilla.xamarin.com/show_bug.cgi?id=30467
     //if you don't want to write the following lines of code, then MAKE YOUR VOICE HEARD ON THAT BUG PLEASE! :)
     Label1.ProcessGestureRecognizers();
     Label2.ProcessGestureRecognizers();
     Label3.ProcessGestureRecognizers();
     Label4.ProcessGestureRecognizers();
     Label5.ProcessGestureRecognizers();
     Label6.ProcessGestureRecognizers();
 }
    // protected void Button1_Click1(object sender, EventArgs e)


    protected void Button2_Click(object sender, EventArgs e)
    {
        if (txtfirst.Text == "" || txtsecond.Text == "" || txtemail.Text == "")
        {
            Label4.Text      = "*Fields can not be empty";
            Label4.ForeColor = System.Drawing.Color.Red;
            Label4.Focus();
        }


        else
        {
            XmlDocument xmldoc  = new XmlDocument();
            API.Service updateP = new API.Service();
            // API.Service updateP = new API.Service();
            xmldoc.LoadXml("<XML>" + updateP.update_Basic_Profile(Session["Email"].ToString(), Session["P@ss"].ToString(), txtfirst.Text, txtsecond.Text, txtemail.Text, Session["UserID"].ToString()).InnerXml + "</XML>");
            Session["Email"] = "";
            Session["Email"] = txtemail.Text;
            Response.Redirect("V_settings.aspx");
        }
    }
        void ReleaseDesignerOutlets()
        {
            if (Caption != null)
            {
                Caption.Dispose();
                Caption = null;
            }

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

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

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

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

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

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

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

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

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

            if (IssueType != null)
            {
                IssueType.Dispose();
                IssueType = null;
            }
        }
Exemple #9
0
        private void frm_inicio_Load(object sender, EventArgs e)
        {
            // metodo pone un timer a funcionar para ir mostrado la hora en el sistema y se cambie
            timer1.Start();
            // antes de iniciar el programa implementa parametros para acomodar la interfaz dependiendo de la pantalla de computador
            PictureBox1.SetBounds(Screen.PrimaryScreen.Bounds.Width - 150, 15, PictureBox1.Width, PictureBox1.Height);
            pb_inicio.SetBounds(0, Screen.PrimaryScreen.Bounds.Height - 140, pb_inicio.Width, pb_inicio.Height);
            PictureBox3.SetBounds(Screen.PrimaryScreen.Bounds.Width - 60, 15, PictureBox3.Width, PictureBox3.Height);
            PictureBox4.SetBounds(10, 30, PictureBox4.Width, PictureBox4.Height);
            PictureBox5.SetBounds(this.Width - 200, this.Height - 100, PictureBox5.Width, PictureBox5.Height);
            Label1.SetBounds(100, 30, Label1.Width, Label1.Height);
            nombre.SetBounds(Screen.PrimaryScreen.Bounds.Width - 290, PictureBox1.Height - 40, nombre.Width, nombre.Height);
            Label4.SetBounds(Screen.PrimaryScreen.Bounds.Width - 290, PictureBox1.Height - 15, Label4.Width, Label4.Height);
            Label11.SetBounds(this.Width - 245, this.Height - 120, Label11.Width, Label11.Height);
            Label12.SetBounds(Screen.PrimaryScreen.Bounds.Width - 60, PictureBox3.Height + 15, Label12.Width, Label12.Height);
            Label4.SetBounds(Screen.PrimaryScreen.Bounds.Width - 220, PictureBox1.Height, Label4.Width, Label4.Height);
            pn_principal.SetBounds(PictureBox4.Width + 50, PictureBox4.Height + 40, Panel1.Width + pn_empleados.Width + Pn_pagos.Width + 400, Panel4.Height + Panel1.Height + 100);
            Panel1.SetBounds(PictureBox4.Width + 50, PictureBox4.Height + 40, Panel1.Width, Panel1.Height);
            pn_empleados.SetBounds(Panel1.Width + 350, PictureBox4.Height + 40, pn_empleados.Width, pn_empleados.Height);
            Pn_pagos.SetBounds(pn_empleados.Width + 800, PictureBox4.Height + 40, Pn_pagos.Width, Pn_pagos.Height);
            Panel4.SetBounds(PictureBox4.Width + 50, Panel1.Height + 200, Panel4.Width, Panel4.Height);
            Panel5.SetBounds(Panel4.Width + 350, Panel1.Height + 200, Panel5.Width, Panel5.Height);
            pn_configuracion.SetBounds(Panel5.Width + 800, Panel1.Height + 200, Panel5.Width, Panel5.Height);
            pn_principal.Hide();


            // obtiene los datos del usuario actual por medio de la variable ID

            DataSet ds = conexion.sqlconsulta("Select nombre,cedula,foto from  tbl_usuarios  where id_usuario='" + ID.ToString() + "'");

            nombre.Text = ds.Tables[0].Rows[0].ItemArray[0].ToString();
            Label4.Text = ds.Tables[0].Rows[0].ItemArray[1].ToString();

            try
            {
                PictureBox1.BackgroundImage       = Image.FromFile(ds.Tables[0].Rows[0].ItemArray[3].ToString());
                PictureBox1.BackgroundImageLayout = ImageLayout.Stretch;
            }
            catch (Exception ex)
            {
                PictureBox1.BackgroundImage       = Image.FromFile(@"perfiles\profile.png");
                PictureBox1.BackgroundImageLayout = ImageLayout.Stretch;
            }

            var busqueda = new StreamReader("configuracion.cfg");

            String cadena;

            while ((cadena = busqueda.ReadLine()) != null)
            {
                string[] campos = cadena.Split(':');
                if (campos[0].Equals("Fondo"))
                {
                    this.BackgroundImage       = Image.FromFile("fondo/" + campos[1]);
                    this.BackgroundImageLayout = ImageLayout.Stretch;
                }
                cadena = busqueda.ReadLine();
            }


            busqueda.Close();
        }
Exemple #10
0
        private void LoadData(String Filename)
        {
            String CurLine;                                         // 存讀取器抓到的字串
            int    Section = 0;                                     // 設定變數存狀態,預設為0

            String[] Piecewise;                                     // 存字串陣列

            StreamReader TaskCSV = new StreamReader(Filename);      // 用資料流讀取器抓資料

            //-------讀檔,要做檢查跳出的判斷式-------//
            while ((CurLine = TaskCSV.ReadLine()) != null)
            {
                int fileEnd = 0;
                if (CurLine.ToUpper().Contains("DATA_TIME"))        // 先將字串矩陣轉大寫,在檢查裡面是否包含特定字串
                //if (CurLine.ToUpper().Contains("NUM1"))        // 先將字串矩陣轉大寫,在檢查裡面是否包含特定字串
                {
                    Section = 1;                                    // Section = 1,這行要跳過
                }
                else if (CurLine.ToUpper().Contains("0"))
                {
                    Section = 2;                                   // Section = 2,數值資料的部分
                }

                switch (Section)
                {
                case 1:
                    Piecewise    = CurLine.Trim().Split(',');
                    ItemsNumbers = Piecewise.Length;
                    break;

                case 2:
                    Piecewise = CurLine.Trim().Split(',');
                    //------判斷是否讀到空字串了------------//
                    if (Piecewise[0] == "" || Piecewise[0] == string.Empty || Piecewise[0] == null)
                    {
                        fileEnd = 1;
                        break;
                    }
                    else     //解析字串內容並存進矩陣
                    {
                        for (int j = 0; j < ItemsNumbers; j++)
                        {
                            //------把各項數值放進對應的List裡------//
                            if (j == 0)
                            {
                                Index.Add(Convert.ToDouble(Piecewise[j]));
                            }
                            else if (j == 1)
                            {
                                DataTime.Add(Convert.ToDouble(Piecewise[j]));
                            }
                            else if (j == 5)
                            {
                                Gap.Add(Convert.ToDouble(Piecewise[j]));
                            }
                            else if (j == 6)
                            {
                                Feed.Add(Convert.ToDouble(Piecewise[j]));
                            }
                            else if (j == 7)
                            {
                                Hipwr.Add(Convert.ToDouble(Piecewise[j]));
                            }
                            else if (j == 8)
                            {
                                WaterR.Add(Convert.ToDouble(Piecewise[j]));
                            }
                            //else if (j == 9) Label3.Add(Convert.ToDouble(Piecewise[j]));
                            else if (j == 10)
                            {
                                Label4.Add(Convert.ToDouble(Piecewise[j]));
                            }
                            else if (j == 11)
                            {
                                Label5.Add(Convert.ToDouble(Piecewise[j]));
                            }

                            /*
                             * if (j == 0) Gap.Add(Convert.ToDouble(Piecewise[j]));
                             * else if (j == 1) Feed.Add(Convert.ToDouble(Piecewise[j]));
                             * else if (j == 2) Hipwr.Add(Convert.ToDouble(Piecewise[j]));
                             * else if (j == 3) WaterR.Add(Convert.ToDouble(Piecewise[j]));
                             * else if (j == 4) Label5.Add(Convert.ToDouble(Piecewise[j]));
                             */
                        }
                    }
                    break;
                }
                if (fileEnd == 1)
                {
                    break;
                }
            }
        }
Exemple #11
0
 private void actualizacion_Load(object sender, EventArgs e)
 {
     ProgressBar1.Hide();
     Label3.Hide();
     Label4.Hide();
 }