private void openNewJhdFile() { DateTime tNow = DateTime.Now; Moment mNow = new Moment(tNow.Year, tNow.Month, tNow.Day, tNow.Hour, tNow.Minute, tNow.Second); HoraInfo info = new HoraInfo(mNow, MhoraGlobalOptions.Instance.Latitude, MhoraGlobalOptions.Instance.Longitude, MhoraGlobalOptions.Instance.TimeZone); childCount++; Horoscope h = new Horoscope(info, (HoroscopeOptions)MhoraGlobalOptions.Instance.HOptions.Clone()); //new HoroscopeOptions()); MhoraChild child = new MhoraChild(h); child.Text = childCount.ToString() + " - Prasna Chart"; child.MdiParent = this; child.Name = child.Text; //info.name = child.Text; try { child.Show(); } catch (System.OutOfMemoryException ex) { MessageBox.Show(ex.Message); } }
private void openJhdFileNow() { DateTime tNow = DateTime.Now; Moment mNow = new Moment(tNow.Year, tNow.Month, tNow.Day, tNow.Hour, tNow.Minute, tNow.Second); OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "JHD Files (*.jhd)|*.jhd"; if (ofd.ShowDialog() != DialogResult.OK) { return; } HoraInfo info = (new Jhd(ofd.FileName)).toHoraInfo(); info.tob = mNow; string[] _path_split = ofd.FileName.Split(new Char[] { '/', '\\' }); ArrayList path_split = new ArrayList(_path_split); childCount++; Horoscope h = new Horoscope(info, (HoroscopeOptions)MhoraGlobalOptions.Instance.HOptions.Clone()); //Horoscope h = new Horoscope (info, new HoroscopeOptions()); MhoraChild child = new MhoraChild(h); child.Text = childCount.ToString() + " - Prasna Chart"; child.MdiParent = this; child.Name = child.Text; child.Show(); }
public void AddChild(Horoscope h, string name) { childCount++; MhoraChild child = new MhoraChild(h); h.OnChanged(); child.Text = childCount.ToString() + " - " + name; child.MdiParent = this; child.Name = child.Text; child.Show(); }
private void menuItemNewView_Click(object sender, System.EventArgs e) { MhoraChild curr = (MhoraChild)this.ActiveMdiChild; if (null == curr) { return; } MhoraChild child2 = new MhoraChild(curr.getHoroscope()); child2.Text = curr.Text; child2.MdiParent = this; child2.Name = curr.Name; child2.Show(); }
private void openJhdFile() { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Hora Files (*.jhd; *.mhd)|*.jhd;*.mhd"; if (ofd.ShowDialog() != DialogResult.OK) { return; } string[] sparts = ofd.FileName.ToLower().Split(new char[] { '.' }); HoraInfo info = null; if (sparts[sparts.Length - 1] == "jhd") { info = (new Jhd(ofd.FileName)).toHoraInfo(); } else { info = (new Mhd(ofd.FileName)).toHoraInfo(); } string[] _path_split = ofd.FileName.Split(new Char[] { '/', '\\' }); ArrayList path_split = new ArrayList(_path_split); childCount++; Horoscope h = new Horoscope(info, new HoroscopeOptions()); MhoraChild child = new MhoraChild(h); child.Text = childCount.ToString() + " - " + path_split[path_split.Count - 1]; child.MdiParent = this; child.Name = child.Text; child.mJhdFileName = ofd.FileName; child.Show(); }