Пример #1
0
        /// <include file='doc\DomainUpDown.uex' path='docs/doc[@for="DomainUpDown.ToString"]/*' />
        /// <devdoc>
        ///     Provides some interesting info about this control in String form.
        /// </devdoc>
        /// <internalonly/>
        public override string ToString()
        {
            string s = base.ToString();

            if (Items != null)
            {
                s += ", Items.Count: " + Items.Count.ToString(CultureInfo.CurrentCulture);
                s += ", SelectedIndex: " + SelectedIndex.ToString(CultureInfo.CurrentCulture);
            }
            return(s);
        }
Пример #2
0
        private void CheckInPatient()
        {
            if (SelectedIndex == null) //shouldnt be able to happen but to prevent crash --> return.
            {
                return;
            }
            int index         = int.Parse(SelectedIndex.ToString(), System.Globalization.CultureInfo.InvariantCulture);
            int appointmentID = int.Parse(FilteredAppointments.Rows[index][0].ToString(), System.Globalization.CultureInfo.InvariantCulture);

            PatientDBConverter.CheckInPatient(appointmentID);
            Success("Success!", "Patient has been checked-in.");
            InitialiseDataTable(); // To refresh table after adjustments --> triggering onpropertychange
        }
Пример #3
0
        protected override void SaveNode(XmlDocument xmlDoc, XmlElement nodeElement, SaveContext context)
        {
            if (this.storedId != null)
            {
                XmlElement outEl = xmlDoc.CreateElement("familyid");
                outEl.SetAttribute("value", this.storedId.IntegerValue.ToString(CultureInfo.InvariantCulture));
                nodeElement.AppendChild(outEl);

                XmlElement param = xmlDoc.CreateElement("index");
                param.SetAttribute("value", SelectedIndex.ToString(CultureInfo.InvariantCulture));
                nodeElement.AppendChild(param);
            }
        }
Пример #4
0
 public override void RenderControl(HtmlTextWriter writer)
 {
     if (DesignMode)
     {
         CreateChildControls();
         AddAttributesToRender(writer);
         ComboTable.RenderControl(writer);
     }
     else
     {
         HiddenFieldControl.Value = SelectedIndex.ToString();
         base.RenderControl(writer);
     }
 }
Пример #5
0
        /// <summary>
        /// The rendering path for uplevel browsers.
        /// </summary>
        /// <param name="writer">The output stream that renders HTML content to the client.</param>
        protected override void RenderUpLevelPath(HtmlTextWriter writer)
        {
            writer.Write("<?XML:NAMESPACE PREFIX=\"MPNS\" /><?IMPORT NAMESPACE=\"MPNS\" IMPLEMENTATION=\""
                         + AddPathToFilename("multipage.htc") + "\" />");
            writer.WriteLine();

            AddAttributesToRender(writer);

            writer.AddAttribute("selectedIndex", SelectedIndex.ToString());
            writer.AddAttribute("onSelectedIndexChange", "JScript:" + ClientHelperID + ".value=event.selectedIndex");

            writer.RenderBeginTag("MPNS:MultiPage");

            base.RenderUpLevelPath(writer);

            writer.RenderEndTag();  // MPNS:MultiPage
        }
Пример #6
0
        /// <summary>
        /// Initializes the pages and the hidden helper.
        /// </summary>
        /// <param name="e">An EventArgs object that contains the event data.</param>
        protected override void OnPreRender(EventArgs e)
        {
            // OnPreRender is not called in the designer, and is not needed either
            if (!IsUpLevelBrowser)
            {
                foreach (Control ctrl in Controls)
                {
                    ((PageView)ctrl).OverrideVisible();
                }
            }

            if (NeedHelper)
            {
                HelperData = SelectedIndex.ToString();
            }

            base.OnPreRender(e);
        }
Пример #7
0
        private void SetPos()
        {
            if (Count == 1)
            {
                pnlSelect.Visible = false;
            }
            else
            {
                pnlSelect.Visible = true;
            }
            DoResize();

            lblIndex.Text = SelectedIndex.ToString() + " of " + Count.ToString();

            if (ParentControl != null)
            {
                ParentControl.Focus();
            }
        }
Пример #8
0
        public string GetString()
        {
            switch (ComboType)
            {
            case GotoComboType.ExData:
                if (exItems.Count == 0 || SelectedIndex >= exItems.Count || SelectedIndex < 0)
                {
                    return("");
                }
                return(exItems[SelectedIndex]);

            case GotoComboType.ToCharData:
                return(Goto724Lib.ToChar(Text, GotoChar));

            case GotoComboType.index:
                return(SelectedIndex.ToString());
            }

            return("");
        }
Пример #9
0
        private void CancelAppointment()
        {
            if (SelectedIndex == null) //shouldnt be able to happen but to prevent crash --> return.
            {
                return;
            }
            int index         = int.Parse(SelectedIndex.ToString(), System.Globalization.CultureInfo.InvariantCulture);
            int appointmentID = int.Parse(FilteredAppointments.Rows[index][0].ToString(), System.Globalization.CultureInfo.InvariantCulture);

            string reason = CancellationReason("Reason For Appointment Cancellation?");

            if (reason == "")   // If user closes dialog box, operation is cancelled and appointment remains active
            {
                return;
            }

            PatientDBConverter.DeleteAppointment(appointmentID, reason); // Appointment Moved To Cancelled Schema
            Success("Success!", "Patient appointment has been cancelled.");
            InitialiseDataTable();                                       // To refresh table after adjustments --> triggering onpropertychange
        }
Пример #10
0
        protected void RenderTabPages(HtmlTextWriter writer, int index)
        {
            writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID + "_TabPage" + index.ToString());

            Page.Trace.Warn(SelectedIndex.ToString());

            if (!TabPages[index].Selected && !(SelectedIndex == -1 && index == 0))
            {
                writer.AddStyleAttribute("visibility", "hidden");
                writer.AddStyleAttribute("display", "none");
            }
            else
            {
                writer.AddStyleAttribute("z-index", "1");
            }
            writer.AddStyleAttribute("position", "absolute");
            writer.AddStyleAttribute("width", "100%");
            writer.AddStyleAttribute("height", "100%");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            writer.Write(TabPages[index].Value);
            writer.RenderEndTag();
        }
Пример #11
0
        public string GetString()
        {
            switch (ComboType)
            {
            case EnmComboType.ExItem:
                if (exItems.Count == 0 || SelectedIndex >= exItems.Count || SelectedIndex < 0)
                {
                    return("");
                }
                return(exItems[SelectedIndex]);

            case EnmComboType.ToChar:
                return(ArsLibrary.ToChar(Text, ArsChar));

            case EnmComboType.All:
                return(Text);

            case EnmComboType.Index:
                return(SelectedIndex.ToString());
            }

            return("");
        }
Пример #12
0
        /// <summary>
        /// Overridden. Updates the hidden input's data.
        /// </summary>
        /// <param name="e">An EventArgs object that contains the event data.</param>
        protected override void OnPreRender(EventArgs e)
        {
            HelperData = SelectedIndex.ToString();

            base.OnPreRender(e);
        }
Пример #13
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //PICKER
            case nameof(ItemsSource):
                return(ItemsSource.OfType <object>().Select(x => x.ToString()).Aggregate((x, y) => x + "," + y));

            case nameof(SelectedItem):
                return(SelectedItem.ToString());

            case nameof(SelectedIndex):
                return(SelectedIndex.ToString());

            case nameof(Items):
                return(Items.Aggregate((x, y) => x + "," + y));

            case nameof(Title):
                return(Title);

            default:
                return(string.Empty);
            }
        }
Пример #14
0
    protected override void Render(HtmlTextWriter writer)
    {
        //if (!this.DesignMode)
        //{
        //    scriptManager.RegisterScriptDescriptors(this);
        //}
        var itemCssClass    = false;
        var itemAltCssClass = false;

        if (!string.IsNullOrEmpty(ItemCssClass))
        {
            itemCssClass = true;
        }
        if (!string.IsNullOrEmpty(ItemAltCssClass))
        {
            itemAltCssClass = true;
        }
        writer.WriteBeginTag("ul");
        if (!string.IsNullOrEmpty(CssClass))
        {
            writer.WriteAttribute("class", CssClass);
        }
        if (!string.IsNullOrEmpty(AccessKey))
        {
            writer.WriteAttribute("AccessKey", AccessKey);
        }
        if (Style != null && !string.IsNullOrEmpty(Style.Value))
        {
            writer.WriteAttribute("style", Style.Value);
        }
        writer.WriteAttribute("value", string.IsNullOrEmpty(SelectedValue) ? Items[0].Value : SelectedValue);
        writer.WriteAttribute("index", SelectedIndex.ToString());
        writer.WriteAttribute("id", this.ClientID);
        writer.Write(HtmlTextWriter.TagRightChar);
        var           itemClass = string.Empty;
        var           prefix    = string.Concat(ClientID, "_Item");
        UnorderedItem item;

        for (var i = 0; i < Items.Count; i++)
        {
            itemClass = string.Empty;
            item      = Items[i];
            writer.WriteBeginTag("li");
            writer.WriteAttribute("index", i.ToString());
            writer.WriteAttribute("value", item.Value);
            writer.WriteAttribute("onclick", String.Format("{0}{1}{2}{3}{4}{5}{6}{7}{8}", "SetSelectedValue(this, '", item.Text, "','", item.Value, "',", i, ");", OnClientItemClick ?? string.Empty, Page.ClientScript.GetPostBackEventReference(this, i.ToString())));
            if (i % 2 == 0)
            {
                if (itemCssClass)
                {
                    itemClass = ItemCssClass;
                }
            }
            else
            {
                if (itemAltCssClass)
                {
                    itemClass = ItemAltCssClass;
                }
            }
            if (SelectedIndex == i)
            {
                itemClass = String.Format("{0}{1}{2}", itemClass, " ", SelectedItemCssClass).Trim();
            }
            if (itemClass != string.Empty)
            {
                writer.WriteAttribute("class", ItemCssClass);
            }
            writer.Write(HtmlTextWriter.TagRightChar);
            writer.Write(item.Text);
            writer.WriteEndTag("li");
        }
        writer.WriteEndTag("ul");
        //base.Render(writer);
    }
Пример #15
0
 public override string ToString()
 {
     return(SelectedIndex.ToString());
 }
Пример #16
0
        /// <summary>
        /// The rendering path for uplevel browsers.
        /// </summary>
        /// <param name="writer">The output stream that renders HTML content to the client.</param>
        protected override void RenderUpLevelPath(HtmlTextWriter writer)
        {
            writer.Write("<?XML:NAMESPACE PREFIX=\"" + TagNamespace
                         + "\" /><?IMPORT NAMESPACE=\"" + TagNamespace + "\" IMPLEMENTATION=\""
                         + AddPathToFilename("tabstrip.htc") + "\" />");
            writer.WriteLine();

            AddAttributesToRender(writer);

            writer.AddAttribute("selectedIndex", SelectedIndex.ToString());

            if (Orientation == Orientation.Vertical)
            {
                writer.AddAttribute("orientation", "vertical");
            }
            if (TargetID != String.Empty)
            {
                writer.AddAttribute("targetID", Target.ClientID);
            }

            if (SepDefaultImageUrl != String.Empty)
            {
                writer.AddAttribute("sepDefaultImageUrl", SepDefaultImageUrl);
            }
            if (SepHoverImageUrl != String.Empty)
            {
                writer.AddAttribute("sepHoverImageUrl", SepHoverImageUrl);
            }
            if (SepSelectedImageUrl != String.Empty)
            {
                writer.AddAttribute("sepSelectedImageUrl", SepSelectedImageUrl);
            }

            string style = TabDefaultStyle.CssText;

            if (style != String.Empty)
            {
                writer.AddAttribute("tabDefaultStyle", style);
            }
            style = TabHoverStyle.CssText;
            if (style != String.Empty)
            {
                writer.AddAttribute("tabHoverStyle", style);
            }
            style = TabSelectedStyle.CssText;
            if (style != String.Empty)
            {
                writer.AddAttribute("tabSelectedStyle", style);
            }
            style = SepDefaultStyle.CssText;
            if (style != String.Empty)
            {
                writer.AddAttribute("sepDefaultStyle", style);
            }
            style = SepHoverStyle.CssText;
            if (style != String.Empty)
            {
                writer.AddAttribute("sepHoverStyle", style);
            }
            style = SepSelectedStyle.CssText;
            if (style != String.Empty)
            {
                writer.AddAttribute("sepSelectedStyle", style);
            }

            if (Page != null)
            {
                string script = ClientHelperID + ".value" + "=event.index";

                if (AutoPostBack)
                {
                    script += ";if (getAttribute('_submitting') != 'true'){setAttribute('_submitting','true');try{" + Page.GetPostBackEventReference(this, String.Empty) + ";}catch(e){setAttribute('_submitting','false');}}";
                }

                writer.AddAttribute("onSelectedIndexChange", "JScript:" + script);
                writer.AddAttribute("onwcready", "JScript:try{" + ClientHelperID + ".value=selectedIndex}catch(e){}");
            }

            writer.RenderBeginTag(TagNamespace + ":" + TabStripTagName);
            writer.WriteLine();

            base.RenderUpLevelPath(writer);

            writer.RenderEndTag();
        }
Пример #17
0
        /// <summary>
        /// The rendering path for downlevel browsers.
        /// </summary>
        /// <param name="writer">The output stream that renders HTML content to the client.</param>
        protected override void RenderDownLevelPath(HtmlTextWriter writer)
        {
            writer.WriteLine("<script language=\"javascript\">" + ClientHelperID + ".value=" + SelectedIndex.ToString() + ";</script>");

            writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0");
            writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "0");
            writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");

            AddAttributesToRender(writer);

            writer.RenderBeginTag(HtmlTextWriterTag.Table);

            if (Orientation == Orientation.Horizontal)
            {
                writer.RenderBeginTag(HtmlTextWriterTag.Tr);
            }

            base.RenderDownLevelPath(writer);

            if (Orientation == Orientation.Horizontal)
            {
                writer.RenderEndTag(); // TR
            }
            writer.RenderEndTag();     // TABLE
        }
Пример #18
0
 // Token: 0x06000340 RID: 832 RVA: 0x00024E08 File Offset: 0x00023008
 private void \u0003(object \u0002, EventArgs \u0003)
 {
     if (Operators.CompareString(this .8j3b35wggv7myhr7y5hvz6qsd7mlp7vg \u200A\u2009\u2000\u2005\u0002().Text, \u0006\u2001.\u0002(-1829138894), false) == 0)
     {
         this .8j3b35wggv7myhr7y5hvz6qsd7mlp7vg \u200A\u2009\u2000\u2005\u0002().Text    = \u0006\u2001.\u0002(-1829138787);
         this .8j3b35wggv7myhr7y5hvz6qsd7mlp7vg \u200A\u2009\u2000\u2005\u0002().Image   = \u0002\u2001.\u0005();
         this .8j3b35wggv7myhr7y5hvz6qsd7mlp7vg \u200A\u2009\u2000\u2005\u0002().Enabled = false;
         this .8j3b35wggv7myhr7y5hvz6qsd7mlp7vg \u200A\u2009\u2000\u2005\u0003().Enabled = false;
         int value = 0;
         if (this .8j3b35wggv7myhr7y5hvz6qsd7mlp7vg \u200A\u2009\u2000\u2005\u0003().Text.Contains(\u0006\u2001.\u0002(-1829124959)))
         {
             value = 1;
         }
         this.sk.Send(string.Concat(new string[]
         {
             \u0006\u2001.\u0002(-1829139089),
             \u000E\u2000.\u000E,
             this .8j3b35wggv7myhr7y5hvz6qsd7mlp7vg \u200A\u2009\u2000\u2005\u0002().SelectedIndex.ToString(),
             \u000E\u2000.\u000E,
             Conversions.ToString(checked ((int)Math.Round(unchecked (Conversions.ToDouble(this .8j3b35wggv7myhr7y5hvz6qsd7mlp7vg \u200A\u2009\u2000\u2005\u0003().Text.Split(new char[]
             {
                 ' '
             })[0]) * 1024.0)))),
             \u000E\u2000.\u000E,
             Conversions.ToString(value)
         }));