public void Init(string name, int min) { try { if (!string.IsNullOrWhiteSpace(name)) { WERKSTATT = name; } if (min != default(int)) { MINBESTAND = min; } if (string.IsNullOrEmpty(name)) { CongifManager.Initialize(); } fillView(); messageThread.Start(); } catch (Exception ex) { ExceptionHelper.Handle(ex); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { string s = string.Empty; int min = default(int); if (Environment.GetCommandLineArgs()?.Any(item => item != null && ( bool )item?.Equals("--configure")) == true) { SettingsManager.Instance.ShowEditor(); CongifManager.UpdateSettings(SettingsManager.Instance.GetSettings()); } else if (Environment.GetCommandLineArgs()?.Any(item => item != null && ( bool )item?.Equals("--basic")) == true) { BasicSettings bs = new BasicSettings(); bs.ShowDialog(); s = bs.GetName(); min = bs.GetMin(); } (this.root.DataContext as MainWindowViewModel).Init(s, min); (this.root.DataContext as MainWindowViewModel).TeilChanged = teilChanged; (this.root.DataContext as MainWindowViewModel).TeilNotOk = teilNotOk; (this.root.DataContext as MainWindowViewModel).TeilOk = teilOK; }
static void Main(string[] args) { try { CongifManager.Initialize(); //List<Zentrallager> lager = SdoManager.GetZentrallager(); //CongifManager.UpdateSettings(new DatabaseSettings() { IpAddress = IpAddress.Extern }); //IEnumerable<Autoteile> ret = TeileManager.GetAutoteileWerkstatt("Villach"); //foreach ( var item in ret ) //{ // Console.WriteLine(item.Bezeichnung); //} //Console.WriteLine(TeileManager.GetBestand("Villach", "Blinker")); //HashSet<Column> columns = new HashSet<Column>(); //columns.Add(new Column() { Name = "Standort" , Type = NHibernateUtil.String }); //columns.Add(new Column() { Name = "Name" , Type = NHibernateUtil.String }); //columns.Add(new Column() { Name = "t.X" , Alias = "lon" , Type = NHibernateUtil.String }); //using ( IRepository rep = RepositoryFactory.Instance.CreateRepository<RepositoryForSpecialDataTypes>() ) //{ // Console.WriteLine("OK"); // IList lst = ( rep as RepositoryForSpecialDataTypes ).GetQuery("zentrallager, table(sdo_util.getvertices(koordinatenz)) t" , // "not koordinatenz is null" , columns); // foreach ( object[] item in lst ) // { // foreach ( var itm in item ) // { // Console.Write("ITEM: "); // Console.WriteLine(itm); // } // } //} //foreach ( var item in lager ) //{ // Console.WriteLine(item.Coordinates?.X); //} Console.WriteLine("Start"); TeileManager.Order("Tür", "Villach", "9500 Villach", 5); Console.WriteLine("Finished"); } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine(e.StackTrace); } }
public BasicSettings() { InitializeComponent(); CongifManager.Initialize(); FillComboBox(); }