Example #1
0
 private bool WriteTextboxToByteArray(VarOutput pVariable)
 {
     if (!string.IsNullOrEmpty(this.tbxByteArray.Text))
     {
         try
         {
             string[] strArray = this.tbxByteArray.Text.Split(',');
             if (strArray != null)
             {
                 int num = Convert.ToInt32(this.tbxOffset.Text);
                 if (num >= pVariable.ByteArray.Length)
                 {
                     num = 0;
                     this.tbxOffset.Text = "0";
                 }
                 int index1 = 0;
                 for (int index2 = num; index2 < pVariable.ByteArray.Length; ++index2)
                 {
                     pVariable.ByteArray[index2] = Convert.ToByte(strArray[index1], 16);
                     if (index1 >= strArray.Length)
                     {
                         return(true);
                     }
                     ++index1;
                 }
                 return(true);
             }
         }
         catch
         {
         }
     }
     return(false);
 }
Example #2
0
        public void VarOutputTest(int baseAddress, int byteLength, string outputName)
        {
            var ObjectToTest = new VarOutput(baseAddress, byteLength, outputName);

            Assert.AreEqual(baseAddress, ObjectToTest.BaseAddress);
            Assert.AreEqual(byteLength, ObjectToTest.ByteLength);
            Assert.AreEqual(outputName, ObjectToTest.Name);
            Assert.IsNotNull(ObjectToTest.ByteArray);
        }
Example #3
0
 private void listOutputs_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.listOutputs.SelectedIndex <= -1)
     {
         return;
     }
     this._myOutput = this._varOutput[this.listOutputs.SelectedIndex];
     this.ShowProperties();
 }
Example #4
0
        public void AddObject(VarOutput OutputObject)
        {
            this._varOutput.Add(OutputObject);
            int num = this.listOutputs.Items.Add((object)OutputObject.ToString());

            this.lblObjects.Text = string.Format(this.lblObjects.Text, (object)this._varOutput.Count);
            if (num != 0)
            {
                return;
            }
            this._myOutput = this._varOutput[0];
            this.listOutputs.SelectedIndex = 0;
            this.ShowProperties();
        }
Example #5
0
        public static void Course2()
        {
            VarOutput = "";
            // storing course titles and catalog codes in an array
            string[] names = new string[3] {
                "COP4474C", "UWP2", "Universal Windows Application Development II"
            };
            // using each element in the array in order to assign them to the CourseID, CourseCode, and CourseTitle properties.
            CourseID    = names[0];
            CourseCode  = names[1];
            CourseTitle = names[2];

            // storing prerequisite courses in an array
            string[] prereqs = new string[1] {
                "Universal Windows Application Programming I"
            };
            AboutCourse = "This course presents advanced application design and Microsoft C# programming techniques related to Universal Windows " +
                          "Application development. Students will analyze user interface design and the Windows features that support it, demonstrate a mastery " +
                          "of Microsoft user interface tools, construct a C# database application, and develop a basic C# mobile application that accesses Microsoft " +
                          "Azure.";
            FacultyMember = "Cynthia Moonhowler";

            string credits = "4";

            for (int i = 0; i < names.Length; i++)
            {
                if (VarOutput.Equals(""))
                {
                    VarOutput = names[i];
                }
                else
                {
                    VarOutput = VarOutput + "\n" + names[i];
                }
            }

            // calls the CourseCredits method, passing in the course's credits and prerequisities.
            // assigns the returning value to the public CreditsPrereq property.
            CreditsPrereq = CourseCredits(credits, prereqs);
        }
Example #6
0
        public static void Course1()
        {
            VarOutput = "";
            // storing course titles and catalog codes in an array
            string[] names = new string[3] {
                "COP3288C", "UWP1", "Universal Windows Application Programming I"
            };
            // using each element in the array in order to assign them to the CourseID, CourseCode, and CourseTitle properties.
            CourseID    = names[0];
            CourseCode  = names[1];
            CourseTitle = names[2];

            // storing prerequisite courses in an array
            string[] prereqs = new string[2] {
                "Enterprise Architecture", "Distributed Application Architecture"
            };
            AboutCourse = "This course provides students an introduction to the basic features of the Microsoft C# programming language as " +
                          "it applies to Universal Windows Application mobile application development. Students will review the history, features, and " +
                          "advantages of the C# programming language, utilize the Visual Studio programming environment, demonstrate a mastery of C# " +
                          "programming basics, and develop a basic Universal Windows Application.";
            FacultyMember = "Syed Nabeel";

            string credits = "4";

            for (int i = 0; i < names.Length; i++)
            {
                if (VarOutput.Equals(""))
                {
                    VarOutput = names[i];
                }
                else
                {
                    VarOutput = VarOutput + "\n" + names[i];
                }
            }

            // calls the CourseCredits method, passing in the course's credits and prerequisities.
            // assigns the returning value to the public CreditsPrereq property.
            CreditsPrereq = CourseCredits(credits, prereqs);
        }
Example #7
0
        public static void Course3()
        {
            VarOutput = "";
            // storing course titles and catalog codes in an array
            string[] names = new string[3] {
                "COP4777C", "UWCI", "Universal Windows Application Cloud Integration"
            };
            // using each element in the array in order to assign them to the CourseID, CourseCode, and CourseTitle properties.
            CourseID    = names[0];
            CourseCode  = names[1];
            CourseTitle = names[2];

            // storing prerequisite courses in an array
            string[] prereqs = new string[1] {
                "Universal Windows Application Programming II"
            };
            AboutCourse = "This course focuses on the development of Universal Windows mobile applications that access cloud computing resources. " +
                          "Students will explore the software development kits (SDKs) available from commercial cloud vendors, demonstrate a mastery of the " +
                          "Amazon Web Services Mobile SDK, demonstrate a mastery of the Microsoft Windows Azure Mobile Services SDK, and incorporate AWS or Azure " +
                          "functionality into a working Universal Windows mobile application.";
            FacultyMember = "Shad McDillek";

            string credits = "4";

            for (int i = 0; i < names.Length; i++)
            {
                if (VarOutput.Equals(""))
                {
                    VarOutput = names[i];
                }
                else
                {
                    VarOutput = VarOutput + "\n" + names[i];
                }
            }

            // calls the CourseCredits method, passing in the course's credits and prerequisities.
            // assigns the returning value to the public CreditsPrereq property.
            CreditsPrereq = CourseCredits(credits, prereqs);
        }
Example #8
0
 public InOut(int id, VarInput input, VarOutput output)
 {
     this.Id     = id;
     this.Input  = input;
     this.Output = output;
 }