コード例 #1
0
ファイル: AdminGirisFormu.cs プロジェクト: sezertt/ROPv1
        private void saleCheckChanged(object sender, EventArgs e)
        {
            if (Convert.ToInt32(((CheckBox)sender).Tag) == whichCheckBoxShouldUncheck) // eğer checkbox zaten seçiliyse birşey yapmadan dön
                return;

            leftPanelView.Nodes.Clear();
            splitPanel.Panel2.Controls.Clear();

            switch (whichCheckBoxShouldUncheck) // önceden seçili olan checkboxı kaldır
            {
                #region
                case 1:
                    reportCheckBox.Image = global::ROPv1.Properties.Resources.reportscolor;
                    reportCheckBox.ImageAlign = ContentAlignment.TopCenter;
                    reportCheckBox.ForeColor = SystemColors.ActiveCaption;
                    break;
                case 2:
                    stokCheckBox.Image = global::ROPv1.Properties.Resources.stockcolor;
                    stokCheckBox.ImageAlign = ContentAlignment.TopCenter;
                    stokCheckBox.ForeColor = SystemColors.ActiveCaption;
                    break;
                case 3:
                    ayarCheckBox.Image = global::ROPv1.Properties.Resources.settingscolor;
                    ayarCheckBox.ImageAlign = ContentAlignment.TopCenter;
                    ayarCheckBox.ForeColor = SystemColors.ActiveCaption;
                    break;
                case 4:
                    anketCheckBox.Image = global::ROPv1.Properties.Resources.anket;
                    anketCheckBox.ImageAlign = ContentAlignment.TopCenter;
                    anketCheckBox.ForeColor = SystemColors.ActiveCaption;
                    break;
                default:
                    break;
                #endregion
            }

            switch (Convert.ToInt32(((CheckBox)sender).Tag)) // yeni seçilen checkboxı işaretle ve gerekli işlemleri yap
            {
                #region
                case 1:
                    if (pinForm != null)
                    {
                        if (pinForm.Visible)
                        {
                            this.Invoke((MethodInvoker)delegate
                            {
                                pinForm.Close();
                            });
                            pinForm = null;
                        }
                    }
                    reportCheckBox.Image = global::ROPv1.Properties.Resources.reportsback;
                    buttonBilgiAktar.Visible = false;
                    //report işlemlerini split panelin 1. kısmına koy, seçili işlemi 2. kısma yok
                    leftPanelView.Nodes.Add("Gün Sonu Raporu");
                    leftPanelView.Nodes.Add("İptal Edilen Ürünler");
                    leftPanelView.SelectedNode = leftPanelView.Nodes[0];
                    break;
                case 2:
                    if (pinForm != null)
                    {
                        if (pinForm.Visible)
                        {
                            this.Invoke((MethodInvoker)delegate
                            {
                                pinForm.Close();
                            });
                            pinForm = null;
                        }
                    }
                    stokCheckBox.Image = global::ROPv1.Properties.Resources.stockback;
                    buttonBilgiAktar.Visible = false;
                    //stok işlemlerini split panelin 1. kısmına koy, seçili işlemi 2. kısma yok
                    break;
                case 3:
                    ayarCheckBox.Image = global::ROPv1.Properties.Resources.settingsback;

                    if (pinForm != null)
                    {
                        if (pinForm.Visible)
                        {
                            pinForm.BringToFront();
                            return;
                        }
                    }

                    pinForm = new PinKoduFormu("Ayar Görüntüleme", this);
                    pinForm.Show();
                    break;
                case 4:
                    if (pinForm != null)
                    {
                        if (pinForm.Visible)
                        {
                            this.Invoke((MethodInvoker)delegate
                            {
                                pinForm.Close();
                            });
                            pinForm = null;
                        }
                    }
                    anketCheckBox.Image = global::ROPv1.Properties.Resources.anketBack;
                    buttonBilgiAktar.Visible = false;

                    leftPanelView.Nodes.Add("Değerlendirme(SS)"); // ( Alınan oyların sayısı, alınan tam puanlar , genel puanlama vs. )
                    leftPanelView.Nodes.Add("Değerlendirme(YS)");
                    leftPanelView.Nodes.Add("Anket Sonuçları"); // ( Yapılan anketleri görüntüleme )
                    leftPanelView.Nodes.Add("Kullanıcı Bilgileri"); // ( Kullanıcı bilgileri )
                    leftPanelView.Nodes.Add("Anket Ayarları"); // ( Anket ayarları )

                    leftPanelView.SelectedNode = leftPanelView.Nodes[0];
                    break;
                default:
                    if (pinForm != null)
                    {
                        if (pinForm.Visible)
                        {
                            this.Invoke((MethodInvoker)delegate
                            {
                                pinForm.Close();
                            });
                            pinForm = null;
                        }
                    }
                    break;
                #endregion
            }
            // yeni seçilen checkboxı işaretlemenin kalan kısmı
            ((CheckBox)sender).ImageAlign = ContentAlignment.MiddleCenter;
            ((CheckBox)sender).ForeColor = Color.White;

            //Nodeların eklenmesinden sonra taşma varsa bile ekrana sığması için font boyutunu küçültüyoruz
            foreach (TreeNode node in leftPanelView.Nodes)
            {
                while (leftPanelView.Width - 12 < System.Windows.Forms.TextRenderer.MeasureText(node.Text, new Font(leftPanelView.Font.FontFamily, leftPanelView.Font.Size, leftPanelView.Font.Style)).Width)
                {
                    leftPanelView.Font = new Font(leftPanelView.Font.FontFamily, leftPanelView.Font.Size - 0.5f, leftPanelView.Font.Style);
                }
            }

            //yeni seçilen checkboxı son seçilen checkbox yap
            whichCheckBoxShouldUncheck = Convert.ToInt32(((CheckBox)sender).Tag);

            leftPanelView.Focus();

            if(pinForm != null && pinForm.Visible)
                pinForm.Focus();
        }
コード例 #2
0
ファイル: AdminGirisFormu.cs プロジェクト: sezertt/ROPv1
 private void adisyonCheckBox_Click(object sender, EventArgs e)
 {
     if (pinForm != null)
     {
         if (pinForm.Visible)
         {
             this.Invoke((MethodInvoker)delegate
             {
                 pinForm.Close();
             });
             pinForm = null;
         }
     }
     if(adisyonForm != null)
     {
         if (adisyonForm.IsDisposed)
         {
             adisyonForm = new AdisyonGoruntuleme(odemeyiDegistirenKisi, adisyonDegistirebilirMi);
             adisyonForm.Show();
         }
         else
         {
             adisyonForm.BringToFront();
         }
     }
     else
     {
         adisyonForm = new AdisyonGoruntuleme(odemeyiDegistirenKisi, adisyonDegistirebilirMi);
         adisyonForm.Show();
     }
 }
コード例 #3
0
ファイル: AdminGirisFormu.cs プロジェクト: sezertt/ROPv1
        private void exitPressed(object sender, EventArgs e)
        {
            if (pinForm != null)
            {
                if (pinForm.Visible)
                {
                    this.Invoke((MethodInvoker)delegate
                    {
                        pinForm.Close();
                    });
                    pinForm = null;
                }
            }
            this.Dispose();
            this.Close();

            if (girisForm != null)
            {
                girisForm.adminForm = null;
            }
        }
コード例 #4
0
ファイル: AdminGirisFormu.cs プロジェクト: sezertt/ROPv1
        private void buttonUrunOzellikleri_Click(object sender, EventArgs e)
        {
            if (pinForm != null)
            {
                if (pinForm.Visible)
                {
                    this.Invoke((MethodInvoker)delegate
                    {
                        pinForm.Close();
                    });
                    pinForm = null;
                }
            }
            leftPanelView.Nodes.Clear();
            splitPanel.Panel2.Controls.Clear();

            switch (whichCheckBoxShouldUncheck) // önceden seçili olan checkboxı kaldır
            {
                #region
                case 1:
                    reportCheckBox.Image = global::ROPv1.Properties.Resources.reportscolor;
                    reportCheckBox.ImageAlign = ContentAlignment.TopCenter;
                    reportCheckBox.ForeColor = SystemColors.ActiveCaption;
                    break;
                case 2:
                    stokCheckBox.Image = global::ROPv1.Properties.Resources.stockcolor;
                    stokCheckBox.ImageAlign = ContentAlignment.TopCenter;
                    stokCheckBox.ForeColor = SystemColors.ActiveCaption;
                    break;
                case 3:
                    ayarCheckBox.Image = global::ROPv1.Properties.Resources.settingscolor;
                    ayarCheckBox.ImageAlign = ContentAlignment.TopCenter;
                    ayarCheckBox.ForeColor = SystemColors.ActiveCaption;
                    break;
                case 4:
                    anketCheckBox.Image = global::ROPv1.Properties.Resources.anket;
                    anketCheckBox.ImageAlign = ContentAlignment.TopCenter;
                    anketCheckBox.ForeColor = SystemColors.ActiveCaption;
                    break;
                default:
                    break;
                #endregion
            }

            whichCheckBoxShouldUncheck = 0;

            if (File.Exists("urunler.xml"))
            {
                UrunlerTusu urunlerTusuView = new UrunlerTusu();
                splitPanel.Panel2.Controls.Add(urunlerTusuView);
                urunlerTusuView.Dock = DockStyle.Fill;
            }
            else
            {
                KontrolFormu dialog = new KontrolFormu("Lütfen önce ürünleri tanımlayınız", false);
                dialog.Show();
            }
        }
コード例 #5
0
ファイル: AdminGirisFormu.cs プロジェクト: sezertt/ROPv1
 private void buttonModem_Click(object sender, EventArgs e)
 {
     if (pinForm != null)
     {
         if (pinForm.Visible)
         {
             this.Invoke((MethodInvoker)delegate
             {
                 pinForm.Close();
             });
             pinForm = null;
         }
     }
     ModemFormu modemFormu = new ModemFormu(this);
     DialogResult result = modemFormu.ShowDialog();
     if (result == DialogResult.OK)
         girisForm.tumKullanicilaraMesajYolla("komut=modemBilgileri&SSID=" + SSID + "&Sifre=" + sifre);
 }
コード例 #6
0
ファイル: AdminGirisFormu.cs プロジェクト: sezertt/ROPv1
        private void buttonBilgiAktar_Click(object sender, EventArgs e)
        {
            if (pinForm != null)
            {
                if (pinForm.Visible)
                {
                    this.Invoke((MethodInvoker)delegate
                    {
                        pinForm.Close();
                    });
                    pinForm = null;
                }
            }
            KontrolFormu dialog = new KontrolFormu("Veri aktarımının doğru gerçekleştirilebilmesi için tabletlerin ayarlar ekranında olması gerekmektedir. Devam etmek istiyor musunuz ?", true);
            DialogResult result = dialog.ShowDialog();

            if (result == DialogResult.Yes)
            {
                var di = new DirectoryInfo(Application.StartupPath);

                foreach (var file in di.GetFiles("*", SearchOption.AllDirectories))
                {
                    file.Attributes &= ~FileAttributes.ReadOnly;
                    file.Attributes &= ~FileAttributes.Hidden;
                }

                girisForm.tumKullanicilaraMesajYolla("komut=guncellemeyiBaslat");
                buttonBilgiAktar.Enabled = false;
            }
        }
コード例 #7
0
ファイル: SiparisMasaFormu.cs プロジェクト: sezertt/ROPv1
        private void siparisButonuBasildi(object sender, EventArgs e)
        {
            if (pinForm != null)
            {
                if (pinForm.Visible)
                {
                    pinForm.BringToFront();
                    return;
                }
            }

            if (dialog2 != null)
            {
                if (dialog2.Visible)
                {
                    dialog2.BringToFront();
                    return;
                }
            }

            if (acikMasaVarsaYapma)
            {
                acikMasaVarsaUyariVerFormuOneGetir();
                return;
            }

            pinForm = new PinKoduFormu("Masa Görüntüleme", this);
            pinForm.Show();

            hangiMasaButonunaBasildi = sender as Button;
            hangiMasa = ((Button)sender).Text;
        }