private void VargaRectificationForm_DoubleClick(object sender, System.EventArgs e) { Point pt = this.PointToClient(Control.MousePosition); double click_width = (double)pt.X - (double)vname_width; //double bar_width = (double)(1000 - vname_width*2); double bar_width = (double)(this.Width - vname_width * 2); double perc = click_width / bar_width; if (perc < 0 && perc > 100) { return; } double ut_new = ut_lower + ((ut_higher - ut_lower) * perc); Moment mNew = this.utToMoment(ut_new); h.info.tob = mNew; h.OnChanged(); this.bmpBuffer = null; this.Invalidate(); //Console.WriteLine ("Click at {0}. Width at {1}. Percentage is {2}", // click_width, bar_width, perc); }
public object SetCalcOptions(Object o) { HoroscopeOptions ho = (HoroscopeOptions)o; h.options.Copy(ho); h.OnChanged(); return(h.options.Clone()); }
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(); }