/// <summary>
 /// Initializes a new instance of the FormWhoWasBornOnMyBirthday class.
 /// </summary>
 /// <param name="i_Compare">Strategy comparer</param>
 public FormWhoWasBornOnMyBirthday(ICompare i_Compare)
 {
     InitializeComponent();
     Compare = i_Compare;
     r_Util = Utils.Utils.Instance;
     m_BirthdayDate = FormMainWindow.Birthday;
 }
 /// <summary>
 /// Initializes a new instance of the FormWhoWasBornOnMyBirthday class.
 /// </summary>
 /// <param name="i_Compare">Strategy comparer</param>
 public FormWhoWasBornOnMyBirthday(ICompare i_Compare)
 {
     InitializeComponent();
     Compare        = i_Compare;
     r_Util         = Utils.Utils.Instance;
     m_BirthdayDate = FormMainWindow.Birthday;
 }
        static void Main(string[] args)
        {
            Cesar cifru = new Cesar();

            string[] tests =
            {
                "aabbcc",
                "AaBbCc",
                "yzxYZX",
                "C",
                "The brown fox, tralalalalalalalalalalalalalalalalala"
            };
            Util.TestCriptare(cifru, tests);
            Util.TestCriptare(cifru, Util.GetAlphabet());

            /*
             * foreach (string  test in Utils.Utils.GetAlphabet())
             * {
             *  string clar = test.ToString();
             *  string criptat = cifru.Criptare(test.ToString());
             *  Console.WriteLine("{0}->{1}->{2}", clar, cifru.Criptare(test.ToString()), cifru.Decriptare(criptat));
             * }
             * foreach (string  test  in tests)
             * {
             *  string clar = test.ToString();
             *  string criptat = cifru.Criptare(test.ToString());
             *  Console.WriteLine("{0}->{1}->{2}", clar, cifru.Criptare(test.ToString()), cifru.Decriptare(criptat));
             * }
             */
        }
        /// <summary>
        /// Initializes a new instance of the WhoWasBornOnMyBirthdayForm class.
        /// </summary>
        /// <param name="i_BirthdayDate">Birthday date mm/dd/yyyy </param>
        public WhoWasBornOnMyBirthdayForm(string i_BirthdayDate)
        {
            InitializeComponent();

            r_Util = Utils.Utils.Instance;

            m_BirthdayDate = i_BirthdayDate;
        }
        /// <summary>
        /// Initializes a new instance of the MostLikeablePhotosForm class.
        /// </summary>
        /// <param name="i_TopLikeablePhotos">Top likeable pictures</param>
        /// <param name="i_NumberOfPicturesToShow">Number of pictures to show</param>
        public MostLikeablePhotosForm(List<Photo> i_TopLikeablePhotos, int i_NumberOfPicturesToShow)
        {
            InitializeComponent();

            pictureBoxCurrentPic.LoadCompleted += pictureBoxCurrentPic_LoadCompleted;

            m_TopLikeablePhotos = i_TopLikeablePhotos;
            m_IndexOfCurrentImage = 0;

            m_NumberOfPicturesToShow = i_NumberOfPicturesToShow;

            r_Util = Utils.Utils.Instance;
        }
        /// <summary>
        /// Initializes a new instance of the FormComparedPhotos class.
        /// </summary>
        /// <param name="i_Compare">Strategy comparer</param>
        public FormComparedPhotos(ICompare i_Compare)
        {
            InitializeComponent();
            r_Util = Utils.Utils.Instance;
            Compare = i_Compare;

            pictureBoxCurrentPic.LoadCompleted += pictureBoxCurrentPic_LoadCompleted;

            m_AllPhotos = FormMainWindow.AllPhotos;
            m_IndexOfCurrentImage = 0;

            StartPosition = FormStartPosition.CenterScreen;

            pictureBoxIconFeature.Image = Compare.Picture();

            getTopComparedPhotos();
            loadImage(m_TopComparedPhotos[0]);
        }
        static void Main()
        {
            CifruN cifru = new CifruN();

            Console.WriteLine(cifru.Cheie);

            string[] tests =
            {
                "aabbcc",
                "AaBbCc",
                "yzxYZX",
                "C",
                "The brown fox, tralalalalalalalalalalalalalalalalala"
            };
            Util.TestCriptare(cifru, tests);
            Console.WriteLine("==================");
            Util.TestCriptare(cifru, Util.GetAlphabet());
        }
Exemple #8
0
        /// <summary>
        /// Initializes a new instance of the FormComparedPhotos class.
        /// </summary>
        /// <param name="i_Compare">Strategy comparer</param>
        public FormComparedPhotos(ICompare i_Compare)
        {
            InitializeComponent();
            r_Util  = Utils.Utils.Instance;
            Compare = i_Compare;

            pictureBoxCurrentPic.LoadCompleted += pictureBoxCurrentPic_LoadCompleted;

            m_AllPhotos           = FormMainWindow.AllPhotos;
            m_IndexOfCurrentImage = 0;

            StartPosition = FormStartPosition.CenterScreen;

            pictureBoxIconFeature.Image = Compare.Picture();

            getTopComparedPhotos();
            loadImage(m_TopComparedPhotos[0]);
        }
        /// <summary>
        /// Performs the semantic analysis of the expression
        /// </summary>
        /// <param name="instance">the reference instance on which this element should analysed</param>
        /// <paraparam name="expectation">Indicates the kind of element we are looking for</paraparam>
        /// <returns>True if semantic analysis should be continued</returns>
        public override bool SemanticAnalysis(Utils.INamable instance, Filter.AcceptableChoice expectation)
        {
            bool retVal = base.SemanticAnalysis(instance, expectation);

            if (retVal)
            {
                ListExpression.SemanticAnalysis(instance, Filter.IsRightSide);

                Types.Collection collectionType = ListExpression.GetExpressionType() as Types.Collection;
                if (collectionType != null)
                {
                    IteratorVariable.Type = collectionType.Type;
                    PreviousIteratorVariable.Type = collectionType.Type;
                }
                else
                {
                    AddError("Cannot determine collection type on list expression " + ToString());
                }
            }

            return retVal;
        }
 /// <summary>
 /// Adds a model element in this model element
 /// </summary>
 /// <param name="copy"></param>
 public override void AddModelElement(Utils.IModelElement element)
 {
     {
         Types.NameSpace item = element as Types.NameSpace;
         if (item != null)
         {
             appendNameSpaces(item);
         }
     }
     {
         Rules.RuleDisabling item = element as Rules.RuleDisabling;
         if (item != null)
         {
             appendRuleDisablings(item);
         }
     }
     {
         Tests.Frame item = element as Tests.Frame;
         if (item != null)
         {
             appendTests(item);
         }
     }
 }
        /// <summary>
        /// Adds a model element in this model element
        /// </summary>
        /// <param name="copy"></param>
        public override void AddModelElement(Utils.IModelElement element)
        {
            {
                Parameter item = element as Parameter;
                if (item != null)
                {
                    appendParameters(item);
                }
            }
            {
                Rules.Rule item = element as Rules.Rule;
                if (item != null)
                {
                    appendRules(item);
                }
            }

            base.AddModelElement(element);
        }
        /// <summary>
        /// Adds a model element in this model element
        /// </summary>
        /// <param name="copy"></param>
        public override void AddModelElement(Utils.IModelElement element)
        {
            {
                StructureElement item = element as StructureElement;
                if (item != null)
                {
                    appendElements(item);
                }
            }
            {
                Procedure item = element as Procedure;
                if (item != null)
                {
                    appendProcedures(item);
                }
            }
            {
                Rules.Rule item = element as Rules.Rule;
                if (item != null)
                {
                    appendRules(item);
                }
            }

            base.AddModelElement(element);
        }
        /// <summary>
        /// Initializes a new instance of the MainWindow class.
        /// </summary>
        /// <param name="i_UserData">The user facebook data</param>
        public MainWindow(LoginResult i_UserData)
        {
            InitializeComponent();
            r_LoggedInUser = i_UserData.LoggedInUser;
            FacebookService.s_CollectionLimit = 1000;
            r_Util = Utils.Utils.Instance;

            fetchUserInfo();
        }