public FormProblems(FormMainN father, String line, String status, String problem, bool isWeekend) { this.father = father; this.isWeekend = isWeekend; InitializeComponent(); label1.Text = ""; Toolbox.Colorize(label1, line,false); linestatusLabel.Text = status; if (status.Equals("Good service")) { linestatusLabel.BackColor = Color.White; linestatusLabel.ForeColor = Color.Black; } else { linestatusLabel.BackColor = Color.Blue; linestatusLabel.ForeColor = Color.White; } if (problem != null && !problem.Equals("blah")) { StringBuilder sb = new StringBuilder(); sb.Append("<html><body>"); sb.Append(problem); sb.Append("</body></html>"); webBrowser1.DocumentText = sb.ToString(); this.problem = problem; } else { webBrowser1.DocumentText = "<html><body>No extra information for this line...</body></html>"; this.problem = "No extra information for this line..."; } }
public FormFavoritesN(FormMainN main, String line) { try { InitializeComponent(); this.main = main; this.favline = line; Toolbox.Colorize(this.line, favline, false); Hashtable stations = Toolbox.FetchStations(line); stations_mem = stations; ICollection keys = stations.Keys; ArrayList sorter = new ArrayList(); sorter.AddRange(keys); sorter.Sort(); foreach (String s in sorter) { comboBox1.Items.Add(s); } Toolbox.SetButtonStyle(mem1); Toolbox.SetButtonStyle(mem2); Toolbox.SetButtonStyle(mem3); Toolbox.SetButtonStyle(mem4); redraw_memories(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public Fetcher(FormMainN form,String line,String station, String station_nice,String direction) { this.mainform = form; this.line = line; this.station = station; this.station_nice = station_nice; this.direction = direction; setNowUrl(); }
public FormOptions(FormMainN father) { this.father = father; InitializeComponent(); int i; if ((i = findIndex(combo_autostart, Toolbox.getSetting("autostart"))) != -1) combo_autostart.SelectedIndex = i; else combo_autostart.SelectedIndex = 1; if ((i=findIndex(combo_depaction,Toolbox.getSetting("depaction")))!=-1) combo_depaction.SelectedIndex = i; else combo_depaction.SelectedIndex = 1; if ((i = findIndex(combo_depfix, Toolbox.getSetting("depfix"))) != -1) combo_depfix.SelectedIndex = i; else combo_depfix.SelectedIndex = 1; if ((i = findIndex(combo_depobsthres, Toolbox.getSetting("depobsthres"))) != -1) combo_depobsthres.SelectedIndex = i; else combo_depobsthres.SelectedIndex = 2; if ((i = findIndex(combo_linefetch, Toolbox.getSetting("linefetch"))) != -1) combo_linefetch.SelectedIndex = i; else combo_linefetch.SelectedIndex = 1; if ((i = findIndex(combo_runthres, Toolbox.getSetting("runthres"))) != -1) combo_runthres.SelectedIndex = i; else combo_runthres.SelectedIndex = 2; //populate map options updateMapSetting(Toolbox.getSetting("mapviewer")); }
public FormMap(FormMainN father,Bitmap pmap) { this.father = father; FileStream fsImage = null; ; InitializeComponent(); string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\tubemap.jpg"; try { if (pmap == null) { IBitmapImage imageBitmap; fsImage = new FileStream(appPath, FileMode.Open); if (Screen.PrimaryScreen.Bounds.Height > 600) { pictureBox1.Size = new Size(2051, 1369); imageBitmap = CreateThumbnail(fsImage, new Size(2051, 1369)); } else imageBitmap = CreateThumbnail(fsImage, new Size(1755, 1238)); map = ImageUtils.IBitmapImageToBitmap( imageBitmap); pictureBox1.Image = map; } else pictureBox1.Image = pmap; } catch (Exception e) { String s = e.ToString(); } finally { if (fsImage != null) fsImage.Close(); } Cursor.Current = Cursors.Default; Cursor.Show(); }
public FormDeparturesW(FormMainN main, String line, String station, String station_nice, String direction, String dummy) : this(null, line, station, station_nice, direction) { this.mainform = main; }
public Fetcher(FormMainN form) { this.mainform = form; setNowUrl(); }
public FormMap(FormMainN father) { InitializeComponent(); }
private static void startApp() { Toolbox.setSettings(); if (Toolbox.getSetting("1rstrun").Equals("No")) { FormMainN form; String scr = Toolbox.getSetting("screentype"); if (scr.Equals("wide")) { form = new FormMainW(); } else form = new FormMainN(); Application.Run(form); } else { FormNotes nf = new FormNotes(null); Application.Run(nf); } }