예제 #1
0
        public MvcContainer(HttpResponseBase httpResponse, string tag, string _additionalText = null,
            InsertAt _insertion = InsertAt.End)
        {
            if (httpResponse == null)
            {
                throw new ArgumentNullException("httpResponse");
            }

            if (string.IsNullOrEmpty(tag))
            {
                throw new ArgumentNullException("tag");
            }

            this.HttpResponse = httpResponse;
            this.Tag = tag;
            AdditionalText = _additionalText ?? String.Empty;
            Insertion = _insertion;

            if (Insertion == InsertAt.Begin) WriteAdditionalText();
        }
예제 #2
0
        private void buttonInsertAt_Click(object sender, EventArgs e)
        {
            var ia = new InsertAt();

            ia.FrameCount = KeyFrames.Count;
            using (PropertyDialog d = new PropertyDialog("Track Settings", ia))
            {
                if (d.ShowDialog() == DialogResult.OK)
                {
                    while (KeyFrames.Count <= ia.FrameCount)
                    {
                        KeyFrames.Add(new Key());
                    }

                    var toRem = KeyFrames.Count - ia.FrameCount;
                    for (int i = 0; i < toRem; i++)
                    {
                        KeyFrames.RemoveAt(KeyFrames.Count - 1);
                    }
                }
            }
        }