private void btnKaydet_Click(object sender, EventArgs e) { BaglantiCumleOlustur(); connectionStringBuilder.InitialCatalog = "master"; if (ConnectionTool.CheckConnection(connectionStringBuilder.ConnectionString)) { connectionStringBuilder.InitialCatalog = txtDbAdi.Text; MessageBox.Show("Seçtiğiniz server da belirttiğiniz database yok ise bu mesajdan sonra oluşturulacak.Bu işlem uzun sürebilir."); SettingsTool.AyarDegistir(SettingsTool.Ayarlar.DatabaseAyarlari_BaglantiCumlesi, connectionStringBuilder.ConnectionString); SettingsTool.Save(); using (var context = new FaysConceptContext()) { context.Database.CreateIfNotExists(); if (!context.Kullanicilar.Any(c => c.KullaniciAdi == "Yönetici")) { context.Kullanicilar.Add(new Kullanici { KullaniciAdi = "Yönetici", Parola = "953199" }); context.SaveChanges(); } } //MessageBox.Show("Bağlantı Başarılı."); kaydedildi = true; this.Close(); } else { MessageBox.Show("Bağlantı Başarısız."); } }
public frmKullaniciGiris() { InitializeComponent(); SqlConnectionStringBuilder conneticiConnectionStringBuilder = new SqlConnectionStringBuilder(); conneticiConnectionStringBuilder.ConnectionString = SettingsTool.AyarOku(SettingsTool.Ayarlar.DatabaseAyarlar_BaglantiCumlesi); if (!ConnectionTool.CheckConnetion(conneticiConnectionStringBuilder.ConnectionString)) { frmBaglantiAyarlari form = new frmBaglantiAyarlari(); form.ShowDialog(); } context = new NetSatisContext(); KlasoreIzinVer(); checkAnimsa.CheckStateChanged += (s, e) => { if (checkAnimsa.CheckState == CheckState.Checked) { Properties.Settings.Default.Animsa = true; Properties.Settings.Default.KullaniciAdi = txtKullanici.Text; Properties.Settings.Default.Parola = txtParola.Text; Properties.Settings.Default.Save(); } else { Properties.Settings.Default.Animsa = false; Properties.Settings.Default.KullaniciAdi = null; Properties.Settings.Default.Parola = null; Properties.Settings.Default.Save(); } }; }
private void simpleButton1_Click(object sender, EventArgs e) { BaglantiCumleOlustur(); connectionStringBuilder.InitialCatalog = "master"; if (ConnectionTool.CheckConnection(connectionStringBuilder.ConnectionString)) { connectionStringBuilder.InitialCatalog = txtDbAdi.Text; MessageBox.Show("Sectiğiniz Serverda Belittiğiniz Database Yoksa Bu Mesajdan Sonra Oluşturulacak.Bu İşlem Uzun Sürebilir. "); SettingsTool.AyarDegistir(SettingsTool.Ayarlar.DatabaseAyarlari_BaglantiCumlesi, connectionStringBuilder.ConnectionString); SettingsTool.save(); using (var context = new IsbaSatisContext()) { context.Database.CreateIfNotExists(); if (!context.Kullanicilar.Any(c => c.KullaniciAdi == "yönetici")) { context.Kullanicilar.Add(new Kullanici { KullaniciAdi = "yönetici", Adi = "isba", Soyadi = "Yazılım", Parola = "2515", KayitTarihi = DateTime.Now }); context.SaveChanges(); } } kaydedildi = true; this.Close(); } else { MessageBox.Show("Bağlantı Başarısız"); } }
public MainForm() { InitializeComponent(); m_ConnectionTool = new ConnectionTool(); m_SelectionTool = new ElementSelectionTool(); m_ElementDeletionTool = new ElementDeletionTool(); m_DisconnectionTool = new DisconnectionTool(); m_SelectionTool.OnElementSelected += new ElementSelected(selectionTool_OnElementSelected); m_OffsetTool = new UserTool(); m_OffsetTool.OnMouseClick += new MouseEventHandler(OffsetTool_OnMouseClick); (PartSelectionTool.Instance as PartSelectionTool).OnPartSelected += new PartSelected(partSelectionTool_OnPartSelected); //signalingForm.Show(dockPanel, DockState.DockRight); signalingForm.Height = (int)(Height * 0.5); signalingForm.Show(dockPanel, DockState.DockBottom); menuItem_SignalControl.Checked = signalingForm.Visible; signalingForm.VisibleChanged += new EventHandler(toolForm_VisibleChanged); //propertyForm.Show(signalingForm.Pane, DockAlignment.Bottom, 0.5); propertyForm.Show(dockPanel, DockState.DockRight); propertyForm.VisibleChanged += new EventHandler(toolForm_VisibleChanged); menuItem_SignalControl.Checked = propertyForm.Visible; simulationForm.Show(propertyForm.Pane, DockAlignment.Top, 0.4); menuItem_SimControl.Checked = simulationForm.Visible; simulationForm.VisibleChanged += new EventHandler(toolForm_VisibleChanged); m_HelpFileName = Path.Combine(Application.StartupPath, "help.chm"); //dockPanel. }
public static ConnectionTool getInstance() { if (instance == null) { instance = new ConnectionTool(); } return(instance); }
public static ConnectionTool getInstance() { if (instance == null) { instance = new ConnectionTool(); } return instance; }
public CircuitEditorForm() { InitializeComponent(); connectionTool = new ConnectionTool(); selectionTool = new SelectionTool(); selectionTool.OnElementSelected += new ElementSelected(selectionTool_OnElementSelected); }
public frmKullaniciGiris() { InitializeComponent(); if (!ConnectionTool.CheckConnection(SettingsTool.AyarOku(SettingsTool.Ayarlar.DatabaseAyarlari_BaglantiCumlesi))) { frmBaglantiAyarlari frm = new frmBaglantiAyarlari(); frm.ShowDialog(); } context = new IsbaSatisContext(); }
private void b_save_Click(object sender, RoutedEventArgs e) { //Connection String aus TextBox wird in Session-Variable gespeichert ConnectionTool.SetValue("DBConnectionString", tb_db_constr.Text); //Benutzer wird über Erfolg informier MessageBox.Show("Die Datenbankeinstellungen wurden erfolgreich gespeichert", "KICKERCUP", MessageBoxButton.OK, MessageBoxImage.Information); //Weiterleitung auf Seite fuer Login Login l = new Login(); this.NavigationService.Navigate(l); }
private void simpleButton2_Click(object sender, EventArgs e) { BaglantiCumleOlustur(); connectionStringBuilder.InitialCatalog = "master"; if (ConnectionTool.CheckConnection(connectionStringBuilder.ConnectionString)) { MessageBox.Show("Bağlantı Başarılı"); } else { MessageBox.Show("Bağlantı Başarısız"); } }
public FrmKullaniciGiris() { InitializeComponent(); KlasoreIzinVer(); //Kullanıcı giriş formu oluşturulurken bağlantı kontrolü ve kayıt if (!ConnectionTool.CheckConnection(SettingsTool.AyarOku(SettingsTool.Ayarlar.DatabaseAyarlari_BaglantiCumlesi))) { FrmBaglantiAyarlari form = new FrmBaglantiAyarlari(); form.ShowDialog(); } context = new FaysConceptContext(); txtKullaniciAdi.Text = SettingsTool.AyarOku(SettingsTool.Ayarlar.FrmKullaniciGiris_VarsayılanKullanici); }
private void btnTest_Click(object sender, EventArgs e) { BaglantiCumleOlustur(); connectionStringBuilder.InitialCatalog = "master"; if (ConnectionTool.CheckConnection(connectionStringBuilder.ConnectionString)) { labelControl6.Text = "Durum : Sunucu ile Bağlantı Başarılı."; btnKaydet.Visible = true; } else { labelControl6.Text = "Durum : Sunucu ile Bağlantı Başarısız."; } }
private void btnTest_Click(object sender, EventArgs e) { BaglantiCumleOlustur(); //connectionStringBuilder.InitialCatalog = "master"; // MessageBox.Show(connectionStringBuilder.ConnectionString); if (ConnectionTool.CheckConnection(connectionStringBuilder.ConnectionString)) { connectionStringBuilder.InitialCatalog = txtDbAdi.Text; MessageBox.Show("Bağlantı Başarılı."); } else { MessageBox.Show("Bağlantı Başarısız."); } }
private void btnKaydet_Click(object sender, EventArgs e) { BaglantiCumleOlustur(); connectionStringBuilder.InitialCatalog = "master"; if (ConnectionTool.CheckConnection(connectionStringBuilder.ConnectionString)) { labelControl6.Text = "Durum : Sunucu ile Bağlantı Başarılı."; SettingsTool.AyarDegistir(SettingsTool.Ayarlar.DataBaseAyarlari_BaglantiCumlesi, connectionStringBuilder.ConnectionString); SettingsTool.Kaydet(); kayitedildi = true; this.Close(); } else { labelControl6.Text = "Durum : Sunucu ile Bağlantı Başarısız."; } }
public virtual void Awake() { ct = ConnectionTool.getInstance(); }
public virtual void Awake() { ct = ConnectionTool.getInstance(); }
private void SetupPatchingGraphical_Load(object sender, EventArgs e) { diagramDisplay.Diagram = diagramSetController.CreateDiagram("filterDiagram"); diagramDisplay.Diagram.Size = new Size(0, 0); diagramDisplay.BackColor = Color.FromArgb(250, 250, 250); diagramDisplay.Diagram.Layers.Add(_visibleLayer); diagramDisplay.Diagram.Layers.Add(_hiddenLayer); diagramDisplay.SetLayerVisibility(_visibleLayer.Id, true); diagramDisplay.SetLayerVisibility(_hiddenLayer.Id, false); diagramDisplay.ShowDefaultContextMenu = false; diagramDisplay.ClicksOnlyAffectTopShape = true; diagramDisplay.HighQualityRendering = true; // A: fixed shapes with no connection points: nothing (parent nested shapes: node groups, controllers) ((RoleBasedSecurityManager) diagramDisplay.Project.SecurityManager).SetPermissions( SECURITY_DOMAIN_FIXED_SHAPE_NO_CONNECTIONS, StandardRole.Operator, Permission.Insert); // B: fixed shapes with connection points: connect only (element nodes (leaf), output shapes) ((RoleBasedSecurityManager) diagramDisplay.Project.SecurityManager).SetPermissions( SECURITY_DOMAIN_FIXED_SHAPE_WITH_CONNECTIONS, StandardRole.Operator, Permission.Connect | Permission.Insert); // C: movable shapes: connect, layout (movable), and deleteable (filters, patch lines) ((RoleBasedSecurityManager) diagramDisplay.Project.SecurityManager).SetPermissions( SECURITY_DOMAIN_MOVABLE_SHAPE_WITH_CONNECTIONS, StandardRole.Operator, Permission.Connect | Permission.Insert | Permission.Layout | Permission.Delete); // D: fixed shapes with no connection points, but deletable: only for established patch lines (so the user can't move them again, but an still delete them) ((RoleBasedSecurityManager) diagramDisplay.Project.SecurityManager).SetPermissions( SECURITY_DOMAIN_FIXED_SHAPE_NO_CONNECTIONS_DELETABLE, StandardRole.Operator, Permission.Insert | Permission.Delete); // E: all permissions ((RoleBasedSecurityManager) diagramDisplay.Project.SecurityManager).SetPermissions( SECURITY_DOMAIN_ALL_PERMISSIONS, StandardRole.Operator, Permission.All); ((RoleBasedSecurityManager) diagramDisplay.Project.SecurityManager).SetPermissions(StandardRole.Operator, Permission.All); ((RoleBasedSecurityManager) diagramDisplay.Project.SecurityManager).CurrentRole = StandardRole.Operator; FillStyle styleElementGroup = new FillStyle("ElementGroup", new ColorStyle(string.Empty, Color.FromArgb(120, 160, 240)), new ColorStyle(string.Empty, Color.FromArgb(90, 120, 180))); styleElementGroup.FillMode = FillMode.Gradient; FillStyle styleElementLeaf = new FillStyle("ElementLeaf", new ColorStyle(string.Empty, Color.FromArgb(200, 220, 255)), new ColorStyle(string.Empty, Color.FromArgb(140, 160, 200))); styleElementLeaf.FillMode = FillMode.Gradient; FillStyle styleFilter = new FillStyle("Filter", new ColorStyle(string.Empty, Color.FromArgb(255, 220, 150)), new ColorStyle(string.Empty, Color.FromArgb(230, 200, 100))); styleFilter.FillMode = FillMode.Gradient; FillStyle styleController = new FillStyle("Controller", new ColorStyle(string.Empty, Color.FromArgb(100, 200, 100)), new ColorStyle(string.Empty, Color.FromArgb(50, 200, 50))); styleController.FillMode = FillMode.Gradient; FillStyle styleOutput = new FillStyle("Output", new ColorStyle(string.Empty, Color.FromArgb(180, 230, 180)), new ColorStyle(string.Empty, Color.FromArgb(120, 210, 120))); styleOutput.FillMode = FillMode.Gradient; project.Design.FillStyles.Add(styleElementGroup, styleElementGroup); project.Design.FillStyles.Add(styleElementLeaf, styleElementLeaf); project.Design.FillStyles.Add(styleFilter, styleFilter); project.Design.FillStyles.Add(styleController, styleController); project.Design.FillStyles.Add(styleOutput, styleOutput); ConnectionTool tool = new ConnectionTool(); tool.DataFlowModificationMade += tool_DataFlowModificationMade; diagramDisplay.CurrentTool = tool; }
private void btnKaydet_Click(object sender, EventArgs e) { BaglantiCumleOlustur(); connectionStringBuilder.InitialCatalog = "master"; if (ConnectionTool.CheckConnetion(connectionStringBuilder.ConnectionString)) { connectionStringBuilder.InitialCatalog = txtDatabase.Text; MessageBox.Show( "Seçtiğiniz Server'da belirtilen Database yoksa bu mesajdan sonra oluşturulacak bu işlem biraz uzun sürebilir"); NetSatis.Entities.Tools.SettingsTool.AyarDegistir(NetSatis.Entities.Tools.SettingsTool.Ayarlar.DatabaseAyarlar_BaglantiCumlesi, connectionStringBuilder.ConnectionString); NetSatis.Entities.Tools.SettingsTool.Save(); using (var context = new NetSatisContext()) { context.Database.CreateIfNotExists(); if (!context.Kasalar.Any(c => c.KasaKodu == "001")) { context.Kasalar.Add(new Kasa { KasaAdi = "Kasa1", KasaKodu = "001", }); context.SaveChanges(); } } using (var context = new NetSatisContext()) { context.Database.CreateIfNotExists(); if (!context.Depolar.Any(c => c.DepoKodu == "001")) { context.Depolar.Add(new Depo { DepoAdi = "Merkez Depo", DepoKodu = "001", }); context.SaveChanges(); } } using (var context = new NetSatisContext()) { context.Database.CreateIfNotExists(); if (!context.Kullanicilar.Any(c => c.KullaniciAdi == "Yönetici")) { context.Kullanicilar.Add(new Kullanici { KullaniciAdi = "Yönetici", Parola = "741852", HatirlatmaSorusu = "Program Firması", Cevap = "EMD", DepoId = 1, KasaId = 1, }); context.SaveChanges(); } } using (var context = new NetSatisContext()) { context.Database.CreateIfNotExists(); if (!context.OdemeTurleri.Any(c => c.OdemeTuruKodu == "001")) { context.OdemeTurleri.Add(new OdemeTuru { OdemeTuruAdi = "Nakit", OdemeTuruKodu = "001", }); context.SaveChanges(); } } using (var context = new NetSatisContext()) { context.Database.CreateIfNotExists(); if (!context.Cariler.Any(c => c.CariKodu == "VRS001")) { context.Cariler.Add(new Cari { CariAdi = "Peşin Satış", CariKodu = "VRS001", FaturaUnvani = "Peşin Satış", }); context.SaveChanges(); } } using (var context = new NetSatisContext()) { context.Database.CreateIfNotExists(); if (!context.OdemeTurleri.Any(c => c.OdemeTuruKodu == "002")) { context.OdemeTurleri.Add(new OdemeTuru { OdemeTuruAdi = "Kredi Kartı", OdemeTuruKodu = "002", }); context.SaveChanges(); } } using (var context = new NetSatisContext()) { context.Database.CreateIfNotExists(); if (!context.OdemeTurleri.Any(c => c.OdemeTuruKodu == "003")) { context.OdemeTurleri.Add(new OdemeTuru { OdemeTuruAdi = "Evrak", OdemeTuruKodu = "003" }); context.SaveChanges(); } } using (var donusum = new VTContext()) { donusum.Database.CreateIfNotExists(); if (!donusum.HareketTipi.Any(c => c.Kodu == "A")) { donusum.HareketTipi.Add(new NetSatis.EDonusum.Models.Donusum.HareketTipi { Aciklama = "A", Kodu = "A" }); donusum.SaveChanges(); } } using (var donusum = new VTContext()) { donusum.Database.CreateIfNotExists(); if (!donusum.HareketTipi.Any(c => c.Kodu == "B")) { donusum.HareketTipi.Add(new NetSatis.EDonusum.Models.Donusum.HareketTipi { Aciklama = "B", Kodu = "B" }); donusum.SaveChanges(); } } using (var donusum = new VTContext()) { donusum.Database.CreateIfNotExists(); if (!donusum.HareketTipi.Any(c => c.Kodu == "-")) { donusum.HareketTipi.Add(new NetSatis.EDonusum.Models.Donusum.HareketTipi { Aciklama = "-", Kodu = "-" }); donusum.SaveChanges(); } } using (var context = new NetSatisContext()) { context.Database.CreateIfNotExists(); if (!context.Kodlar.Any(c => c.Tablo == "Fis")) { context.Kodlar.Add(new Kod { OnEki = "TSF", SonDeger = 1, Tablo = "Fis" }); context.SaveChanges(); } } kaydedildi = true; this.Close(); } else { MessageBox.Show("Bağlantı Başarısız !"); } }
public void ApplicationStartup(object sender, StartupEventArgs e) { ConnectionTool.SetValue("SetDBConnectionString", false); ConnectionTool.SetValue("DBConnectionString", null); }